Skip to content

vimode: Various fixes related to various motion commands - #1489

Merged
techee merged 3 commits into
geany:masterfrom
techee:operator_cmd_fix
Aug 10, 2025
Merged

vimode: Various fixes related to various motion commands#1489
techee merged 3 commits into
geany:masterfrom
techee:operator_cmd_fix

Conversation

@techee

@techee techee commented Jul 20, 2025

Copy link
Copy Markdown
Member

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

techee commented Jul 31, 2025

Copy link
Copy Markdown
Member Author

@Schyrsivochter Does this PR fix the problem for you?

@Schyrsivochter

Copy link
Copy Markdown

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

techee commented Aug 1, 2025

Copy link
Copy Markdown
Member Author

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?

@Schyrsivochter

Copy link
Copy Markdown

Should be fixed now. Does it work as expected?

It does. Thank you very much!

@techee
techee merged commit 798966e into geany:master Aug 10, 2025
2 checks passed
@b4n b4n added this to the 2.2.0 milestone Aug 11, 2025
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

3 participants