vim-mode: amend the cursor position after executing a command

This commit is contained in:
Le Tan 2017-12-02 21:27:20 +08:00
parent f429ffe3e5
commit cfbda92f67

View File

@ -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";
}
}
}