Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set cursor position from on_autocomplete callback #20

Open
lionkor opened this issue Mar 23, 2022 · 0 comments
Open

Set cursor position from on_autocomplete callback #20

lionkor opened this issue Mar 23, 2022 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@lionkor
Copy link
Owner

lionkor commented Mar 23, 2022

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 lionkor added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Mar 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant