forked from qt-creator/qt-creator
Fix crash when computing the selection path.
Task-number: QTCREATORBUG-3097 Reviewed-by: con
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user