Expected behavior
When selecting something from the auto-complete menu, I can navigation the selection menu, select an item, and have it inserted into the buffer.
Actual behavior
With the current implementation, once you press return to select something from the autocomplete menu instead of inserting the intended text, it's replaced with a bunch of <right>
commands (moving the cursor) for text that's already there, and then adds the relevant text after that.
The solution to this is probably to change the current insert logic such that a combination of <left>
, <right>
, and <backspace>
commands are used to correctly replace the intended section of text.
Unfortunately it's not possible to translate the change into a bunch of commands that exit insert mode behind the scenes and modify the buffer, since that will mess with the undo history.
Also, when pressing the <up>
or <down>
arrow keys, or <tab>
/<s-tab>
to navigate the autocomplete drop down that input is transferred to kakoune, changing the buffer, which is not the intended behavior here.