Mysteries of auto-completion

@Simeon

Here’s a weird one. I have two member variables .moving and .movingIndex. While I’m typing m o v i n, both show up. When I get to moving, moving vanishes and only movingIndex is offered, and it is highlighted. The upshot is, I’m done typing, I’m not even looking at the offered values, and when I hit enter, it replaces my perfectly good typing with the wrong thing.

I suggest it shouldn’t drop an offering until AFTER one types past its last character.

Picture available if this wasn’t clear.

@RonJeffries My understanding of how autocomplete works is it will show all suggestions but then not show the exact match when matched. At that point you either press a space or other action or you select from the autocomplete. I pressed enter and the cursor just went to the next line and didn’t mess up moving. When you hit an exact match it expects you to either keep keying, select something from autocomplete, or key some action (+,-,=, etc). As I started keying moving, it brought up the two options and I could have selected one of them at that point. Autocomplete isn’t perfect, but I guess it’s getting better.

when i’ve typed the g and then type enter, as it is the end of the line, it does movingIndex. That is not what I want. I think it shouldn’t prefer the next one while it has one that is right. I could touch movingIndex if I wanted it.

It always seems to have too much stuff, but, yes, it’s improving.

@RonJeffries - just posted this in another post, I was looking for textMode typed tex and when I added the following t menu disappeared. But repeating this textMode was visible when tex had been typed. Not sure if that will always be the case though.

@RonJeffries I see what you mean, hitting return on the hardware keyboard enters the selected autocomplete result, which happens to be movingIndex if moving is fully typed

I think we should actually be hiding the entire autocomplete bar in this case — once .moving has been typed, the bar should disappear under default editor settings and only come back if you start typing further possible completion. Noted it down as a bug to fix

thanks!