fakevim: prevent endless loop when highlighting search results for $

This commit is contained in:
hjk
2011-03-02 11:49:24 +01:00
parent 3d23d26929
commit e78427b7fe

View File

@@ -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())
break;