Operating system or device, Godot version, GPU Model and driver (if graphics related):
Linux 64 bits Godot bd282ff
Issue description:
if you delete a line and the cursor lands on a word in the next line, if you delete characters in the middle of a word and if you uncomment a line while your cursor is on a word the autocomplete popup will show.
Steps to reproduce:
little animated GIFs that demonstrates the behaviour:
deleting a line

uncomment a line

editing middle of word

What other editors do is something like (using qtcreator as an example):
deleting a line

uncomment a line

editing middle of word

Link to minimal example project:
I think a 'generalized' way of putting the problem would be "Don't open autocomplete if the editor forces a cursor location change, only if the user instigated the move"
Does that sound about correct? This could help find a proper solution for #10691
I like it, but i don't know if it will work always, for example, in the case of moving lines up and down, is the user forcing a move, and the autocomplete will pop up.
You mean at the end of a pasted line? That wouldn't be an explicit cursor move I think. It'd be the editor pushing the cursor due to the paste. Was that what you meant?
with (alt + arrow keys) you can move lines of code up and down and that will also trigger autocomplete.
(edit: deleted, after reading didn't make any sense.)
@hpvb you're logic sounds good, the only thing i would add is "Don't open autocomplete if the editor forces a cursor location change, only if the user instigated the move and inserting new text.", this doesn't cover the editing in the middle of the word, but that's the least annoying.
What about "Open autocomplete only when the user instigated the cursor move or inserting new text over white space or inserting text just after deleting text." by using white list approach?
@hubbyist i have a different approach in my computer, i'll upload to github.
In text_edit there's a text operation type, and if the autocomplete only starts when the text operation is insert works really good.
Most helpful comment
What about "Open autocomplete only when the user instigated the cursor move or inserting new text over white space or inserting text just after deleting text." by using white list approach?