Skip to content

vimode: Various fixes related to various motion commands #1489

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

techee
Copy link
Member

@techee techee commented Jul 20, 2025

Fixes handling of b/B/% when used together with e.g. d.

Fixes #1487

techee added 2 commits July 19, 2025 16:20
There possibly was some reason why I restricted operator commands to
single line but my 2025 self doesn't understand why and this breaks
commands like "d100w" or "d%".

Let's drop this stuff.
Since these move backwards, they automatically remove the first character
because the block caret is before the character on which it's placed.
@techee
Copy link
Member Author

techee commented Jul 31, 2025

@Schyrsivochter Does this PR fix the problem for you?

@Schyrsivochter
Copy link

db/dB work correctly now. d% when going backwards (to opening bracket) still removes too much.

Fixes e.g. d% when placed on the closing brace.
@techee techee force-pushed the operator_cmd_fix branch from 2f031e8 to 6a94c1d Compare August 1, 2025 20:59
@techee
Copy link
Member Author

techee commented Aug 1, 2025

Hmm, interesting - I'd have sworn I tested this and it worked but apparently it didn't.

Should be fixed now. Does it work as expected?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

vimode: 'c' or 'd' commands with 'b' or 'B' motion remove one character too many
2 participants