fakevim: fake tab completion

This commit is contained in:
hjk
2010-09-20 18:04:35 +02:00
parent 1507b5b4e1
commit 3d36ece27b

View File

@@ -2824,6 +2824,13 @@ EventResult FakeVimHandler::Private::handleExMode(const Input &input)
m_commandBuffer.chop(1); m_commandBuffer.chop(1);
} }
updateMiniBuffer(); updateMiniBuffer();
} else if (input.isKey(Key_Tab)) {
QStringList completions;
foreach (const QString &entry, g.commandHistory.items()) {
if (entry.startsWith(m_commandBuffer))
completions.append(entry);
}
qDebug() << completions;
} else if (input.isKey(Key_Left)) { } else if (input.isKey(Key_Left)) {
// FIXME: // FIXME:
if (!m_commandBuffer.isEmpty()) if (!m_commandBuffer.isEmpty())