From 005f0a31274fa20ddf1ed68165175daa013718e1 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Mon, 12 Apr 2021 07:25:09 +0200 Subject: [PATCH] TextEditor: Fix highlighting search results at block start Fixes: QTCREATORBUG-25570 Change-Id: I3450cfed49e07cf96c2a2a9cdfa9a0be7a05c49f Reviewed-by: Christian Stenger --- src/plugins/texteditor/texteditor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp index 182cb4ab9cc..8d50ec1b314 100644 --- a/src/plugins/texteditor/texteditor.cpp +++ b/src/plugins/texteditor/texteditor.cpp @@ -3673,7 +3673,7 @@ void TextEditorWidgetPrivate::highlightSearchResults(const QTextBlock &block, co QString text = block.text(); text.replace(QChar::Nbsp, QLatin1Char(' ')); int idx = -1; - int l = 1; + int l = 0; const int left = data.viewportRect.left() - int(data.offset.x()); const int right = data.viewportRect.right() - int(data.offset.x());