Browse Source

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

Le Tan 8 years ago
parent
commit
cfbda92f67
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/utils/vvim.cpp

+ 2 - 1
src/utils/vvim.cpp

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