mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 22:09: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 = tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!(checkMode(VimMode::Normal) && p_moveMode == QTextCursor::KeepAnchor)) {
|
||||||
--second;
|
--second;
|
||||||
|
}
|
||||||
|
|
||||||
int target = first;
|
int target = first;
|
||||||
if (first == pairPosition) {
|
if (first == pairPosition) {
|
||||||
target = second;
|
target = second;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (anchor > target
|
||||||
|
&& !p_cursor.atEnd()
|
||||||
|
&& !useLeftSideOfCursor(p_cursor)) {
|
||||||
|
++anchor;
|
||||||
|
}
|
||||||
|
|
||||||
p_cursor.setPosition(anchor);
|
p_cursor.setPosition(anchor);
|
||||||
p_cursor.setPosition(target, p_moveMode);
|
p_cursor.setPosition(target, p_moveMode);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user