forked from qt-creator/qt-creator
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:
@@ -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();
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user