aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/texteditor/texteditor.cpp2
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();