forked from qt-creator/qt-creator
Fix findScope performance issue
Fixes the performance of large find scope selections. Try Ctrl+A Ctrl+F in a large file and scroll.
This commit is contained in:
@@ -138,6 +138,9 @@ QPainterPath TextEditorOverlay::createSelectionPath(const QTextCursor &begin, co
|
|||||||
|
|
||||||
QTextBlock block = begin.block();
|
QTextBlock block = begin.block();
|
||||||
|
|
||||||
|
if (block.blockNumber() < m_editor->firstVisibleBlock().blockNumber() - 4)
|
||||||
|
block = m_editor->document()->findBlockByNumber(m_editor->firstVisibleBlock().blockNumber() - 4);
|
||||||
|
|
||||||
bool inSelection = false;
|
bool inSelection = false;
|
||||||
|
|
||||||
QVector<QRectF> selection;
|
QVector<QRectF> selection;
|
||||||
|
|||||||
Reference in New Issue
Block a user