fakevim: listen to editor opening and closing

This commit is contained in:
hjk
2009-01-09 17:57:48 +01:00
parent fb93fdaea2
commit fb8e1bb205
3 changed files with 38 additions and 13 deletions

View File

@@ -291,8 +291,12 @@ bool FakeVimHandler::Private::handleEvent(QKeyEvent *ev)
{
int key = ev->key();
// FIXME
if (m_mode == PassingMode && key != Qt::Key_Control && key != Qt::Key_Shift) {
enterCommandMode();
if (key == ',') { // use ',,' to leave, too.
quit();
return true;
}
return false;
}
@@ -1109,6 +1113,8 @@ void FakeVimHandler::Private::handleExCommand(const QString &cmd0)
info += key + ": " + m_config.value(key) + "\n";
emit q->extraInformationChanged(info);
}
enterCommandMode();
updateMiniBuffer();
} else {
showRedMessage("E492: Not an editor command: " + cmd0);
}