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 <jaroslaw.kobus@qt.io>
This commit is contained in:
David Schulz
2025-01-30 14:48:28 +01:00
parent 8f51c40946
commit 896739d136

View File

@@ -8236,7 +8236,7 @@ void TextEditorWidgetPrivate::addSearchResultsToScrollBar(
} }
} else { } else {
m_highlightScrollBarController->addHighlight( m_highlightScrollBarController->addHighlight(
{category, block.blockNumber(), color, prio}); {category, block.firstLineNumber(), color, prio});
} }
} }
} }