Skip to content

Commit 24d889a

Browse files
committed
fix infinite loop
1 parent f9b0cf3 commit 24d889a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/searchresultmodel.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,9 @@ QList<SearchMatch> SearchResultModel::getSearchMatches(const QDocumentLine &docl
324324
match.pos = offset;
325325
match.length = re_match.capturedLength();
326326
result << match;
327+
// next result
328+
re_match = regexp.match(text,offset+match.length);
329+
offset = re_match.capturedStart();
327330
}
328331

329332
return result;

0 commit comments

Comments
 (0)