fix(cli): prevent unmapped keys in Vim Normal mode from inserting text - #22014
fix(cli): prevent unmapped keys in Vim Normal mode from inserting text #22014Rajeshpatel07 wants to merge 2 commits into
Conversation
|
Warning Gemini encountered an error creating the summary. You can try again by commenting |
|
/gemini summary |
Summary of ChangesThis pull request addresses an unexpected behavior in the CLI's Vim mode where pressing certain keys in Normal mode would inadvertently modify the input. The change ensures a more consistent and standard Vim experience by preventing unmapped keys from having any effect, thereby improving the robustness and user experience of the Vim integration. Highlights
Changelog
Activity
|
|
hi @jacob314 , @gsquared94 please review this PR and let me know if any changes are required. |
|
Hi @SandyTao520 please review this PR and let me know if any changes are required. |
|
Hi there! Thank you for your interest in contributing to Gemini CLI. To ensure we maintain high code quality and focus on our prioritized roadmap, we have updated our contribution policy (see Discussion #17383). We only guarantee review and consideration of pull requests for issues that are explicitly labeled as 'help wanted'. All other community pull requests are subject to closure after 14 days if they do not align with our current focus areas. For this reason, we strongly recommend that contributors only submit pull requests against issues explicitly labeled as 'help-wanted'. This pull request is being closed as it has been open for 14 days without a 'help wanted' designation. We encourage you to find and contribute to existing 'help wanted' issues in our backlog! Thank you for your understanding and for being part of our community! |
|
@Rajeshpatel07, apologies for the bot closing this PR! We tried to reopen it but couldn't (the branch might have been deleted). Please feel free to open a new PR with your changes if you'd still like to contribute. We will have someone review it shortly. |
Summary
Fixes a bug where pressing unmapped keys in Vim Normal mode would insert characters into input buffer. This change ensures that unhandled keys are ignored, aligning the CLI's behavior with standard Vim mechanics where text is only inserted during Insert mode.
Details
In the Vim hook, unmapped keys in
NORMALmode were inserted into the buffer. This fix intercepts those unmapped keys and prevents them from modifying the input. I have added tests cases to ensure unmapped keys are ignored and don't change the input buffer.Related Issues
Fixes #21686
How to Validate
gemini-clilocally.Esc.H,M,Q,m,[or/.ioraand verify that typing works normally.npm run testto verify the new Vim normal mode tests pass successfully.Pre-Merge Checklist