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;
|
int beginChar = 0;
|
||||||
if (!inSelection) {
|
if (!inSelection) {
|
||||||
beginChar = begin.positionInBlock();
|
if (block == begin.block()) {
|
||||||
line = blockLayout->lineForTextPosition(beginChar);
|
beginChar = begin.positionInBlock();
|
||||||
|
line = blockLayout->lineForTextPosition(beginChar);
|
||||||
|
firstOrLastBlock = true;
|
||||||
|
}
|
||||||
inSelection = true;
|
inSelection = true;
|
||||||
firstOrLastBlock = true;
|
|
||||||
} else {
|
} else {
|
||||||
// while (beginChar < block.length() && document->characterAt(block.position() + beginChar).isSpace())
|
// while (beginChar < block.length() && document->characterAt(block.position() + beginChar).isSpace())
|
||||||
// ++beginChar;
|
// ++beginChar;
|
||||||
|
|||||||
Reference in New Issue
Block a user