vim-mode: reset to Normal mode when edit begins

This commit is contained in:
Le Tan 2017-06-11 21:05:33 +08:00
parent 41fef0ed88
commit b7f2690e96
2 changed files with 4 additions and 0 deletions

View File

@ -595,6 +595,7 @@ VimMode VVim::getMode() const
void VVim::setMode(VimMode p_mode) void VVim::setMode(VimMode p_mode)
{ {
if (m_mode != p_mode) { if (m_mode != p_mode) {
clearSelection();
m_mode = p_mode; m_mode = p_mode;
resetState(); resetState();

View File

@ -65,6 +65,9 @@ void VEditOperations::updateCursorLineBg()
void VEditOperations::handleEditConfigUpdated() void VEditOperations::handleEditConfigUpdated()
{ {
// Reset to Normal mode.
m_vim->setMode(VimMode::Normal);
updateCursorLineBg(); updateCursorLineBg();
} }