mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 13:59:52 +08:00
vim-mode: amend the cursor position after executing a command
This commit is contained in:
parent
f429ffe3e5
commit
cfbda92f67
@ -2196,6 +2196,8 @@ bool VVim::handleKeyPressEvent(int key, int modifiers, int *p_autoIndentPos)
|
||||
clear_accept:
|
||||
resetState();
|
||||
|
||||
amendCursorPosition();
|
||||
|
||||
if (m_insertModeAfterCommand
|
||||
&& !checkMode(VimMode::Visual)
|
||||
&& !checkMode(VimMode::VisualLine)) {
|
||||
@ -5920,7 +5922,6 @@ void VVim::amendCursorPosition()
|
||||
// Normal mode and cursor at the end of a non-empty block.
|
||||
cursor.movePosition(QTextCursor::PreviousCharacter);
|
||||
m_editor->setTextCursorW(cursor);
|
||||
qDebug() << "vvim alter the cursor position one character left";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user