fakevim: Fix search issues

Highlighting text is always case sensitive regular expression.

Fix asterisk and hash search.

Change-Id: Ia41eee9266de4ed9bf0bd221609d8e02b72ada03
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
Lukas Holecek
2012-10-01 17:27:53 +02:00
committed by hjk
parent d47b058c9b
commit 3e6ac65444
2 changed files with 2 additions and 1 deletions

View File

@@ -2787,6 +2787,7 @@ EventResult FakeVimHandler::Private::handleCommandMode1(const Input &input)
needle = "\\<" + tc.selection().toPlainText() + "\\>"; needle = "\\<" + tc.selection().toPlainText() + "\\>";
setAnchorAndPosition(tc.position(), tc.anchor()); setAnchorAndPosition(tc.position(), tc.anchor());
g.searchBuffer.historyPush(needle); g.searchBuffer.historyPush(needle);
m_lastSearch = needle;
m_lastSearchForward = input.is('*'); m_lastSearchForward = input.is('*');
searchNext(); searchNext();
finishMovement(); finishMovement();

View File

@@ -1756,7 +1756,7 @@ void FakeVimPluginPrivate::highlightMatches(const QString &needle)
QWidget *w = editor->widget(); QWidget *w = editor->widget();
Find::IFindSupport *find = Aggregation::query<Find::IFindSupport>(w); Find::IFindSupport *find = Aggregation::query<Find::IFindSupport>(w);
if (find != 0) if (find != 0)
find->highlightAll(needle, Find::FindRegularExpression); find->highlightAll(needle, Find::FindRegularExpression | Find::FindCaseSensitively);
} }
int FakeVimPluginPrivate::currentFile() const int FakeVimPluginPrivate::currentFile() const