fakevim: prevent unhandled keys producing text input from being inserted while in command mode

Merge-request: 99
Reviewed-by: hjk <qtc-committer@nokia.com>
This commit is contained in:
Martin Aumüller
2010-01-21 17:38:24 +01:00
committed by hjk
parent 82b83abd7f
commit c2a79a63ba

View File

@@ -1765,7 +1765,12 @@ EventResult FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
} else {
//qDebug() << "IGNORED IN COMMAND MODE: " << key << text
// << " VISUAL: " << m_visualMode;
handled = EventUnhandled;
// if a key which produces text was pressed, don't mark it as unhandled
// - otherwise the text would be inserted while being in command mode
if (text.isEmpty()) {
handled = EventUnhandled;
}
}
return handled;