commandline icon indicating copy to clipboard operation
commandline copied to clipboard

Set cursor position from on_autocomplete callback

Open lionkor opened this issue 2 years ago • 0 comments

on_autocomplete currently passes in the current cursor position, in order to allow autocomplete within a word/sentence at a specific point. This is nice, but not as useful as it could be, because the cursor will end up at the end of the autocompletion, which is the end of the entire input.

We need a way to set the cursor's position generally, like c.set_cursor_position(), but it also has to be understood by the caller of on_autocomplete whether or not this has been called. If it was called, dont put the cursor at the end, and if it wasn't, do.

lionkor avatar Mar 23 '22 10:03 lionkor