Make FakeVim use the default find box instead of mini-buffer

Creator already has a find box that works fairly well, so there
is no need for a mini-buffer mode for searching.  This change makes
FakeVim activate the standard find box when the user hits '/' or '?'.

Note: right now both '/' and '?' do forward searching by default
because the Creator find box lacks a "find backwards by default" mode.
This can be added later to the find box if considered useful.
This commit is contained in:
Rhys Weatherley
2009-05-29 07:45:35 +10:00
parent 653223a8b8
commit 790a7879e8
3 changed files with 27 additions and 13 deletions

View File

@@ -1010,12 +1010,7 @@ EventResult FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
m_commandHistoryIndex = m_commandHistory.size() - 1;
updateMiniBuffer();
} else if (key == '/' || key == '?') {
enterExMode(); // to get the cursor disabled
m_mode = (key == '/') ? SearchForwardMode : SearchBackwardMode;
m_commandBuffer.clear();
m_searchHistory.append(QString());
m_searchHistoryIndex = m_searchHistory.size() - 1;
updateMiniBuffer();
emit q->findRequested(key == '?');
} else if (key == '`') {
m_subsubmode = BackTickSubSubMode;
} else if (key == '#' || key == '*') {