Repository navigation
Fix f/F/t/T and ;/, dropping visual mode - #185
Merged
Merged
Conversation
handleMoveToCharacter always called setNormalMode() after a character motion, so pressing f, F, t, T, ; or , in visual, visual line or visual block mode silently ended the selection mode and a following operator such as x or d acted on nothing. Restore the visual mode that was active on entry; normal-mode callers are unaffected. Fixes unstablebuild#184 Signed-off-by: drakeo338 <[email protected]>
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
ernestrc
approved these changes
Oct 7, 2026
ernestrc
enabled auto-merge (squash)
October 7, 2026 13:22
ernestrc
added a commit
that referenced
this pull request
Oct 11, 2026
After #182 and #185, a differential run against Vim 9.1 still showed 109 operator mismatches. handleMetaNormal anchored every operator at the cursor and treated every motion end as inclusive, so Vim's :h exclusive and :h linewise rules, its register semantics and where it leaves the cursor were not modelled: dh deleted the character under the cursor, db joined lines, and gU overwrote the unnamed register. Signed-off-by: ernestrc <[email protected]>
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.
Fixes #184.
In Visual mode, the find-character motions f, F, t, T and their repeats ; and , switched the editor back to Normal mode, so a following x deleted the character under the cursor instead of the selection. The handler now keeps Visual mode for these motions and only moves the cursor. I added handler tests for each motion; they fail on the parent commit and pass with this change.
Authorship