Commit e78427b7 authored by hjk's avatar hjk
Browse files

fakevim: prevent endless loop when highlighting search results for $

parent 3d23d269
......@@ -3755,7 +3755,7 @@ void FakeVimHandler::Private::highlightMatches(const QString &needle0)
QString needle = needle0;
vimPatternToQtPattern(&needle, &flags);
QRegExp needleExp(needle);
while (1) {
while (!tc.atEnd()) {
tc = tc.document()->find(needleExp, tc.position(), flags);
if (tc.isNull())
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