Fixed QML indenter.

This commit is contained in:
Roberto Raggi
2009-09-04 12:54:18 +02:00
parent e2c06d5da1
commit 80a46231f1

View File

@@ -622,6 +622,10 @@ void ScriptEditor::indentBlock(QTextDocument *, QTextBlock block, QChar typedCha
|| ((typedChar == QChar::Null) && block.text().trimmed() == "}")) {
QTextCursor tc(block);
if (typedChar == QLatin1Char('}')
tc = textCursor();
if (TextEditor::TextBlockUserData::findPreviousBlockOpenParenthesis(&tc)) {
const QString text = tc.block().text();
int indent = ts.columnAt(text, ts.firstNonSpace(text));