[codex] Fix Vim normal mode editing#25022
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5da1714b94
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if self.vim_normal_keymap.substitute_char.is_pressed(event) { | ||
| self.delete_forward_kill(/*n*/ 1); |
There was a problem hiding this comment.
Avoid deleting line breaks for
s on empty lines
When the cursor is on an empty Vim line, beginning_of_current_line() and end_of_current_line() are equal and the cursor points at the newline byte, so this new s path calls delete_forward_kill(1) and removes that newline before entering insert mode. In practice, pressing s on a blank line collapses it into the next line instead of just entering insert mode on the empty line, which is destructive for normal Vim editing of multi-line prompts.
Useful? React with 👍 / 👎.
|
I have read the CLA Document and I hereby sign the CLA |
|
recheck |
5da1714 to
6600a19
Compare
Summary
ssupport to substitute the character under the cursor and enter insert modeoso opening below the final line moves the cursor onto the new blank lineValidation
just fmtjust write-config-schemajust test -p codex-configjust test -p codex-tuicoverage for the Vimsandobehavior, keymap conflict handling, and keymap picker snapshotscargo insta pending-snapshots --manifest-path tui/Cargo.tomlgit diff --checkNotes
A full
just test -p codex-tuirun still has two unrelated Guardian feature-flag failures in this checkout:app::tests::update_feature_flags_disabling_guardian_clears_review_policy_and_restores_defaultapp::tests::update_feature_flags_disabling_guardian_clears_manual_review_policy_without_history