terminal: Fix vi mode cursor not updating on k/j navigation#46762
Merged
dinocosta merged 2 commits intozed-industries:mainfrom Jan 15, 2026
Merged
terminal: Fix vi mode cursor not updating on k/j navigation#46762dinocosta merged 2 commits intozed-industries:mainfrom
dinocosta merged 2 commits intozed-industries:mainfrom
Conversation
|
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Elior Nguyen.
|
Previously, pressing `k` or `j` multiple times in terminal vi mode would not update the visual cursor position. The cursor appeared stuck even though internal position was tracked correctly. The fix adds `cx.notify()` in the `key_down` handler when vi mode is enabled, matching the existing behavior in `send_keystroke`. Closes zed-industries#46736
8909cba to
f9a9acc
Compare
Extracts common logic from `key_down` and `send_keystroke` into `process_keystroke` helper method, while preserving vi mode notification fix.
Member
|
@xcb3d Thank you! Was actually trying to select and yank some content from terminal this morning and wondering why Zed's terminal vi mode was not behaving as it should 😬 I've pushed another commit with a small refactoring. Can you also take a look at |
Contributor
Author
|
Hi @dinocosta. Thanks for the help with the vi mode explanation and for the refactor! I've cleared the CLA-bot check as well. Everything should be good to go now. |
dinocosta
approved these changes
Jan 15, 2026
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.
Previously, pressing
korjmultiple times in terminal vi mode would not update the visual cursor position. The cursor appeared stuck even though internal position was tracked correctly.The fix adds
cx.notify()in thekey_downhandler when vi mode is enabled, matching the existing behavior insend_keystroke.Closes #46736
Release Notes: