From 896739d1364c2d8097d72f636a8e8aca0ae5a6c4 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Thu, 30 Jan 2025 14:48:28 +0100 Subject: [PATCH] Editor: fix highlighting of search results in scrolbar the QTextBlock::firstLine function takes into account whether previous blocks are visible. Fixes: QTCREATORBUG-32332 Change-Id: Id0d16274202d46d62f7cf0a1919e86dc82c58fc8 Reviewed-by: Jarek Kobus --- 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 aa98df48632..1c1747e095c 100644 --- a/src/plugins/texteditor/texteditor.cpp +++ b/src/plugins/texteditor/texteditor.cpp @@ -8236,7 +8236,7 @@ void TextEditorWidgetPrivate::addSearchResultsToScrollBar( } } else { m_highlightScrollBarController->addHighlight( - {category, block.blockNumber(), color, prio}); + {category, block.firstLineNumber(), color, prio}); } } }