Commit 3236678c authored by Thorbjørn Lindeijer's avatar Thorbjørn Lindeijer
Browse files

Fixed resetting of block highlighting when leaving the extra area

When the block highlighting was enabled, it would still get removed when
the mouse left the extra area. Now it changes back to the text cursor
position.

Done with mae.
parent 0c0cacb7
......@@ -2722,7 +2722,12 @@ void BaseTextEditor::extraAreaMouseEvent(QMouseEvent *e)
|| !TextBlockUserData::hasClosingCollapse(cursor.block().next()))
d->extraAreaHighlightCollapseColumn = cursor.block().next().length()-1;
}
} else if (d->m_displaySettings.m_highlightBlocks) {
QTextCursor cursor = textCursor();
d->extraAreaHighlightCollapseBlockNumber = cursor.blockNumber();
d->extraAreaHighlightCollapseColumn = cursor.position() - cursor.block().position();
}
if (highlightBlockNumber != d->extraAreaHighlightCollapseBlockNumber
|| highlightColumn != d->extraAreaHighlightCollapseColumn)
d->m_highlightBlocksTimer->start(d->m_highlightBlocksInfo.isEmpty() ? 40 : 10);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment