fakevim: return false from eventFilter when key has not been handled

(makes standard key bindings work)
This commit is contained in:
Martin Aumueller
2008-12-23 22:28:46 +01:00
committed by hjk
parent eb5f4774a0
commit 6424bd585c

View File

@@ -511,7 +511,7 @@ void FakeVimHandler::Private::showBlackMessage(const QString &msg)
bool FakeVimHandler::Private::handleCommandMode(int key, const QString &text) bool FakeVimHandler::Private::handleCommandMode(int key, const QString &text)
{ {
Q_UNUSED(text) bool handled = true;
if (m_submode == RegisterSubMode) { if (m_submode == RegisterSubMode) {
m_register = key; m_register = key;
@@ -834,9 +834,11 @@ bool FakeVimHandler::Private::handleCommandMode(int key, const QString &text)
leaveVisualMode(); leaveVisualMode();
} else { } else {
qDebug() << "Ignored in command mode: " << key << text; qDebug() << "Ignored in command mode: " << key << text;
return false; if (text.isEmpty())
handled = false;
} }
return true;
return handled;
} }
bool FakeVimHandler::Private::handleInsertMode(int key, const QString &text) bool FakeVimHandler::Private::handleInsertMode(int key, const QString &text)