diff --git a/src/plugins/fakevim/fakevimhandler.cpp b/src/plugins/fakevim/fakevimhandler.cpp
index f924eb37718510b22b9a0ff87a5baac0005baa92..b021f061bd8c33abf1f97faaa881081c6f4aba75 100755
--- a/src/plugins/fakevim/fakevimhandler.cpp
+++ b/src/plugins/fakevim/fakevimhandler.cpp
@@ -285,6 +285,7 @@ public:
     EventResult handleRegisterMode(int key, int unmodified, const QString &text);
     EventResult handleMiniBufferModes(int key, int unmodified, const QString &text);
     void finishMovement(const QString &text = QString());
+    void resetCommandMode();
     void search(const QString &needle, bool forward);
     void highlightMatches(const QString &needle);
     void stopIncrementalFind();
@@ -872,6 +873,11 @@ void FakeVimHandler::Private::finishMovement(const QString &dotCommand)
         updateMiniBuffer();
     }
 
+    resetCommandMode();
+}
+
+void FakeVimHandler::Private::resetCommandMode()
+{
     m_movetype = MoveInclusive;
     m_mvcount.clear();
     m_opcount.clear();
@@ -1752,6 +1758,8 @@ EventResult FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
             m_submode = NoSubMode;
             m_subsubmode = NoSubSubMode;
             finishMovement();
+        } else {
+            resetCommandMode();
         }
     } else {
         //qDebug() << "IGNORED IN COMMAND MODE: " << key << text