Codea 3.3 (262)

I don’t like how the new autocomplete suggestions overlay the common use buttons and I have to X out to see them again. I prefer the old arrangement when autocomplete was on top of the buttons

@Bri_G yes that relates to how Lua works

@dave1707 thank you for the detailed steps, I’ll try to reproduce

@skar I moved them into that area because they used to overlap your code as you typed it — so my workaround for that was to automatically scroll a little higher than necessary above the keyboard as you typed. But that created a problem where tapping to select text just above the keyboard would jump the scrolling up too high.

In the end I figured having to tap the “X” isn’t too bad, but if I can think of something better I’ll try it

@dave1707 - your last post last point is very similar to my experience. I was trying to add a loop in the Final Frontier post in a function called distance. The loop was to detect the key of the closest planet to the touch function. It was a nested loop and I spent ages trying to sort the table to get the key of the lowest distance. I did this multiple times deleting the new loop each time (complicated because when I used a decrimenting loop it didn’t operate properly due to the requirement of adding the increment -1 value in the loop - as mentioned above). After several attempts the loop seemed to partially disappear and the following line moved up to the right of the previous line. Felt like each time I deleted the loop some control characters were added/deleted resulting in the text shift.

@Simeon - pity about the negative increment issue, seems more intuitive to operate a +1 or -1 increment by default if not specified. Why just the automatic +1 option ? Suppose we have to live with that if it’s down to Lua itself.

On the pasting of text into a new tab - try selecting a function, say setup and copy and paste it into a new tab. Note selecting a function by dragging either gives you highlighted text to the end of that function or the end of the first line of the next function - the separating line doesn’t seem to be selectable. Now paste into the new tab. The cursor ends up between the n and d of the final line ‘end’.

This suggest to me that the Codea code moves the cursor after pasting - to the wrong position. Not an issue except when you try to place your cursor at the end of a tab code the cursor jumps up a line. Selecting the end of the code to add a new function is difficult.

Edit: forgot to mention latest edits improved cursor placement at the bottom of a tab but the en|d effect is still present.

@Bri_G oh good catch! I’ve fixed that issue for the next beta build. It’s down to the “Format on Paste” option. Turning that off in the “Editor Configuration” from the main screen fixes it, but the next build has it fixed regardless of the “Format on Paste” setting

@Simeon Glad you’ve got that one! It’s been bugging me, but I hadn’t gotten around to reporting it. Is this the right place to do that?

I am having issues using command + arrows or ctrl + arrows to move the cursor in a line.

After I place the cursor with a tap, command-?? does nothing, command-?? puts the cursor at the beginning of the line as it should.

When I move the cursor with the arrow keys, I get the inverse behavior: command-?? does nothing, command-?? puts the cursor at the end of the line as it should.

Once the cursor has been moved to the beginning or end of the line via a command key combo, both command-?? and command-?? work as expected. If the cursor is moved there with the keyboard or by touch, it has this incorrect behavior again.

Command-Arrow navigation works normally in the release version

Thanks @AlbertEinlime that does seem like incorrect behaviour. Thanks for documenting the specific instances where it’s incorrect, it’ll make it much easier to debug

@Simeon The Voxel Editor example needs some work. Putting out a warning. I can’t get it to save or load anything.

@Simeon - I placed a large csv file into the documents text and whilst trying to edit the text Codea crashed. Tried several times - could be related to the data pasted in originally.

@Simeon I hope you came up with a change for the autocomplete. It’s very annoying having to constantly press the X to hide the line as you try to enter code. It’s like it takes twice as long and would be faster if the autocomplete wasn’t there. Maybe reverse it. Tap something to bring up the autocomplete line.

@dave1707 which of the top row of keys do you usually need when autocomplete is shown fhat you need to press the X to access?

@Simeon It’s usually a letter with () or < > or other top row keys. I also ran into a lot of problems when I was trying to undo some code with the undo key. It’s usually just a mixture of what I’m keying. I guess my problem is I don’t use spaces in between letters and things from the top row. It’s hard to pin down specific things, but it seems like I’m constantly pressing the X key a lot.

@Simeon Here’s something similar to what I might run into. Key the below line of code.

    if a[e]>b[c] or a*b[c]<a*b+5 then

@dave1707 yeah putting spaces definitely lessens the issue, though I notice it when typing the subscript a[e]

I’ll keep thinking about what we can do

In IDEs I’ve used, autocomplete will pop out at the entry point of the cursor.

@Simeon Maybe instead of the autocomplete bar showing automatically, you can show a button above the run key of the keyboard. Then if I want autocomplete, I tap the button and then if I tap a word or re-tap the button, it hides the autocomplete bar… There are probably more times I don’t want the autocomplete than the times I do.

i don’t use it often but i do find it useful, esp since i like long names. i’ve not tried the new scheme but the old works fine for me.

@RonJeffries do you put spaces between your operators? This is probably the biggest factor in @dave1707’s example. The spaces automatically clear the autocomplete bar, making it easier to get to the extended keyboard keys

The main instance where it doesn’t is for subscript access ([...]) where you need to clear the autocomplete bar to hit the [] key

depends. usually i do around = + -, space after commas often, … almost never, * / rarely.