Commit 3564feac authored by Christian Kamm's avatar Christian Kamm Committed by con
Browse files

Fix crash when computing the selection path.

Task-number: QTCREATORBUG-3097
Reviewed-by: con
parent a783a90f
......@@ -166,10 +166,12 @@ QPainterPath TextEditorOverlay::createSelectionPath(const QTextCursor &begin, co
int beginChar = 0;
if (!inSelection) {
beginChar = begin.positionInBlock();
line = blockLayout->lineForTextPosition(beginChar);
if (block == begin.block()) {
beginChar = begin.positionInBlock();
line = blockLayout->lineForTextPosition(beginChar);
firstOrLastBlock = true;
}
inSelection = true;
firstOrLastBlock = true;
} else {
// while (beginChar < block.length() && document->characterAt(block.position() + beginChar).isSpace())
// ++beginChar;
......
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