forked from qt-creator/qt-creator
Block highlight works incorrectly with methods having parameters split in several lines
task-number: QTCREATORBUG-611
This commit is contained in:
@@ -4733,11 +4733,14 @@ void BaseTextEditor::_q_highlightBlocks()
|
|||||||
while (TextBlockUserData::findPreviousBlockOpenParenthesis(&cursor, firstRun)) {
|
while (TextBlockUserData::findPreviousBlockOpenParenthesis(&cursor, firstRun)) {
|
||||||
firstRun = false;
|
firstRun = false;
|
||||||
highlightBlocksInfo.open.prepend(cursor.blockNumber());
|
highlightBlocksInfo.open.prepend(cursor.blockNumber());
|
||||||
highlightBlocksInfo.visualIndent.prepend(d->visualIndent(cursor.block()));
|
int visualIndent = d->visualIndent(cursor.block());
|
||||||
if (closeCursor.isNull())
|
if (closeCursor.isNull())
|
||||||
closeCursor = cursor;
|
closeCursor = cursor;
|
||||||
if (TextBlockUserData::findNextBlockClosingParenthesis(&closeCursor))
|
if (TextBlockUserData::findNextBlockClosingParenthesis(&closeCursor)) {
|
||||||
highlightBlocksInfo.close.append(closeCursor.blockNumber());
|
highlightBlocksInfo.close.append(closeCursor.blockNumber());
|
||||||
|
visualIndent = qMin(visualIndent, d->visualIndent(closeCursor.block()));
|
||||||
|
}
|
||||||
|
highlightBlocksInfo.visualIndent.prepend(visualIndent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user