Commit fd76b100 authored by hjk's avatar hjk Committed by Roberto Raggi
Browse files

improve handling of tab searching

parent 6bfe250e
......@@ -290,7 +290,16 @@ void FakeVimHandler::Private::finishMovement()
void FakeVimHandler::Private::updateMiniBuffer()
{
QString msg;
msg = QChar(m_commandCode ? m_commandCode : ' ') + m_commandBuffer;
msg = QChar(m_commandCode ? m_commandCode : ' ');
for (int i = 0; i != m_commandBuffer.size(); ++i) {
QChar c = m_commandBuffer.at(i);
if (c.unicode() < 64) {
msg += '^';
msg += QChar(c.unicode() + 64);
} else {
msg += c;
}
}
int l = cursorLineInDocument();
int w = columnsOnScreen();
msg += QString(w, ' ');
......@@ -633,6 +642,9 @@ void FakeVimHandler::Private::handleExMode(int key, const QString &text)
m_commandBuffer = m_searchHistory.at(m_searchHistoryIndex);
}
updateMiniBuffer();
} else if (key == Key_Tab) {
m_commandBuffer += QChar(9);
updateMiniBuffer();
} else {
m_commandBuffer += QChar(key);
updateMiniBuffer();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment