Set cursor position from on_autocomplete callback
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 95
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the on_autocomplete callback and the code that currently places the cursor at the end of the completed input. Review the existing cursor API, including the proposed c.set_cursor_position() behavior, and determine how the caller can distinguish an explicitly set position from the default. Done means autocomplete preserves an explicitly selected position and otherwise retains the current end-of-input behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100