Block highlight works incorrectly with methods having parameters split in several lines

task-number: QTCREATORBUG-611
This commit is contained in:
mae
2010-02-17 16:02:47 +01:00
parent 727d71a48d
commit 20ec30223c

View File

@@ -4733,11 +4733,14 @@ void BaseTextEditor::_q_highlightBlocks()
while (TextBlockUserData::findPreviousBlockOpenParenthesis(&cursor, firstRun)) {
firstRun = false;
highlightBlocksInfo.open.prepend(cursor.blockNumber());
highlightBlocksInfo.visualIndent.prepend(d->visualIndent(cursor.block()));
int visualIndent = d->visualIndent(cursor.block());
if (closeCursor.isNull())
closeCursor = cursor;
if (TextBlockUserData::findNextBlockClosingParenthesis(&closeCursor))
if (TextBlockUserData::findNextBlockClosingParenthesis(&closeCursor)) {
highlightBlocksInfo.close.append(closeCursor.blockNumber());
visualIndent = qMin(visualIndent, d->visualIndent(closeCursor.block()));
}
highlightBlocksInfo.visualIndent.prepend(visualIndent);
}
}
}