forked from qt-creator/qt-creator
FakeVim: Emulate search more precisely
Submitting search highlights (if 'hlsearch' enabled) in visible editors. Update highlights after 'nohlsearch' command, 'set hlsearch' and changing document. Change-Id: I66ed8c6e9c6e99f3c64f91cdec5ac5feb636d2cb Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -1987,11 +1987,12 @@ void FakeVimPluginPrivate::changeSelection(const QList<QTextEdit::ExtraSelection
|
||||
|
||||
void FakeVimPluginPrivate::highlightMatches(const QString &needle)
|
||||
{
|
||||
IEditor *editor = EditorManager::currentEditor();
|
||||
QWidget *w = editor->widget();
|
||||
Find::IFindSupport *find = Aggregation::query<Find::IFindSupport>(w);
|
||||
if (find != 0)
|
||||
find->highlightAll(needle, Find::FindRegularExpression | Find::FindCaseSensitively);
|
||||
foreach (IEditor *editor, EditorManager::instance()->visibleEditors()) {
|
||||
QWidget *w = editor->widget();
|
||||
Find::IFindSupport *find = Aggregation::query<Find::IFindSupport>(w);
|
||||
if (find != 0)
|
||||
find->highlightAll(needle, Find::FindRegularExpression | Find::FindCaseSensitively);
|
||||
}
|
||||
}
|
||||
|
||||
int FakeVimPluginPrivate::currentFile() const
|
||||
|
||||
Reference in New Issue
Block a user