mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 13:59:52 +08:00
vim-mode: fix % behovior in d/c command
This commit is contained in:
parent
044b3d3c29
commit
2bdad19253
@ -3346,13 +3346,21 @@ handle_target:
|
||||
second = tmp;
|
||||
}
|
||||
|
||||
--second;
|
||||
if (!(checkMode(VimMode::Normal) && p_moveMode == QTextCursor::KeepAnchor)) {
|
||||
--second;
|
||||
}
|
||||
|
||||
int target = first;
|
||||
if (first == pairPosition) {
|
||||
target = second;
|
||||
}
|
||||
|
||||
if (anchor > target
|
||||
&& !p_cursor.atEnd()
|
||||
&& !useLeftSideOfCursor(p_cursor)) {
|
||||
++anchor;
|
||||
}
|
||||
|
||||
p_cursor.setPosition(anchor);
|
||||
p_cursor.setPosition(target, p_moveMode);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user