diff options
author | David Schulz <david.schulz@qt.io> | 2021-01-15 09:43:12 +0100 |
---|---|---|
committer | David Schulz <david.schulz@qt.io> | 2021-01-15 10:14:10 +0000 |
commit | 8526c7de77834fb382976fae13eceedc69ede02b (patch) | |
tree | f1681d3807d3609ea5e0e0f120a855a568f5217d /src | |
parent | d8acff46ff3b1fce10a3baa30f35b3e0408f4e51 (diff) |
TextEditor: Fix search result highlight for overlapping results
Fixes: QTCREATORBUG-25237
Change-Id: Ib95e49b4db57909b79295f2ff7729560ab45c8a9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/texteditor/texteditor.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp index 927cf294af..a1e8dfa8f0 100644 --- a/src/plugins/texteditor/texteditor.cpp +++ b/src/plugins/texteditor/texteditor.cpp @@ -3680,7 +3680,7 @@ void TextEditorWidgetPrivate::highlightSearchResults(const QTextBlock &block, co .toTextCharFormat(C_SEARCH_RESULT).background().color().darker(120); 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()) break; idx = match.capturedStart(); |