forked from qt-creator/qt-creator
TextEditor: Fix search result highlight for overlapping results
Fixes: QTCREATORBUG-25237 Change-Id: Ib95e49b4db57909b79295f2ff7729560ab45c8a9 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -3680,7 +3680,7 @@ void TextEditorWidgetPrivate::highlightSearchResults(const QTextBlock &block, co
|
|||||||
.toTextCharFormat(C_SEARCH_RESULT).background().color().darker(120);
|
.toTextCharFormat(C_SEARCH_RESULT).background().color().darker(120);
|
||||||
|
|
||||||
while (idx < text.length()) {
|
while (idx < text.length()) {
|
||||||
const QRegularExpressionMatch match = m_searchExpr.match(text, idx + 1);
|
const QRegularExpressionMatch match = m_searchExpr.match(text, idx + l + 1);
|
||||||
if (!match.hasMatch())
|
if (!match.hasMatch())
|
||||||
break;
|
break;
|
||||||
idx = match.capturedStart();
|
idx = match.capturedStart();
|
||||||
|
Reference in New Issue
Block a user