fix(tui): reopen autocomplete after backspace deletes space#6031
Merged
rekram1-node merged 2 commits intoanomalyco:devfrom Jan 12, 2026
Merged
Conversation
b417245 to
7b4f1f0
Compare
Contributor
Author
|
Hey @rekram1-node , just a quick ping to check this PR when you have time. Thanks! |
Collaborator
|
Does it work with CJK characters before and in the @ part? |
Contributor
Author
Yes, I tested with CJK characters before and in the @ trigger. Autocomplete opens correctly, cursor positioning is fine, and behavior is consistent. The screenshots show: 1.你好 @ (Chinese: "Hello @") |
Contributor
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
Collaborator
|
/review |
Contributor
|
lgtm |
sauerdaniel
pushed a commit
to sauerdaniel/opencode
that referenced
this pull request
Jan 13, 2026
…o#6031) Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
dl-alexandre
pushed a commit
to dl-alexandre/opencode
that referenced
this pull request
Jan 13, 2026
…o#6031) Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
triklozoid
pushed a commit
to triklozoid/opencode
that referenced
this pull request
Feb 2, 2026
…o#6031) Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.





Problem
When typing
/or@, autocomplete shows suggestions.If you press space by mistake, the dropdown closes.
When you press backspace to remove the space, autocomplete does not come back, even though the text is valid again.
Steps to Reproduce
/something→ autocomplete appearsFix
Updated the
onInputlogic to reopen autocomplete when the cursor is back in a valid position.For
/Autocomplete reopens when the text starts with
/and there is no space before the cursorFor
@Finds the closest
@before the cursor and reopens autocomplete if there is no space between@and the cursorTesting
/something→ space → backspace → autocomplete reopens@agent→ space → backspace → autocomplete reopenstest/pathdoes not trigger/autocompleteScreen.Recording.2025-12-23.at.6.31.46.PM.mov
Screen.Recording.2025-12-23.at.6.33.38.PM.mov