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() ...@@ -290,7 +290,16 @@ void FakeVimHandler::Private::finishMovement()
void FakeVimHandler::Private::updateMiniBuffer() void FakeVimHandler::Private::updateMiniBuffer()
{ {
QString msg; 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 l = cursorLineInDocument();
int w = columnsOnScreen(); int w = columnsOnScreen();
msg += QString(w, ' '); msg += QString(w, ' ');
...@@ -633,6 +642,9 @@ void FakeVimHandler::Private::handleExMode(int key, const QString &text) ...@@ -633,6 +642,9 @@ void FakeVimHandler::Private::handleExMode(int key, const QString &text)
m_commandBuffer = m_searchHistory.at(m_searchHistoryIndex); m_commandBuffer = m_searchHistory.at(m_searchHistoryIndex);
} }
updateMiniBuffer(); updateMiniBuffer();
} else if (key == Key_Tab) {
m_commandBuffer += QChar(9);
updateMiniBuffer();
} else { } else {
m_commandBuffer += QChar(key); m_commandBuffer += QChar(key);
updateMiniBuffer(); 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