diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2009-07-16 09:25:16 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2009-07-16 09:25:16 +0200 |
commit | fc33e35554fb93dbd2ceabd4f8a60b90cc7fce0e (patch) | |
tree | 697b710ac680b456a3668b7d0e2befd6f53c73f2 /src | |
parent | e5f322e4722717383eb394bb8705d0a259fd9c82 (diff) | |
parent | 1f525f929d180dfef4d008a2a231ff7cc3c06a53 (diff) | |
download | qt-creator-fc33e35554fb93dbd2ceabd4f8a60b90cc7fce0e.tar.gz |
Merge branch 'master' of git@scm.dev.nokia.troll.no:creator/mainline
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/duieditor/duieditor.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/duieditor/duieditor.cpp b/src/plugins/duieditor/duieditor.cpp index 9300ba45f3..58624f5561 100644 --- a/src/plugins/duieditor/duieditor.cpp +++ b/src/plugins/duieditor/duieditor.cpp @@ -617,8 +617,10 @@ void ScriptEditor::indentBlock(QTextDocument *, QTextBlock block, QChar typedCha { TextEditor::TabSettings ts = tabSettings(); - if (typedChar == QLatin1Char('}')) { - QTextCursor tc = textCursor(); + if (typedChar == QLatin1Char('}') + || ((typedChar == QChar::Null) && block.text().trimmed() == "}")) { + + QTextCursor tc(block); if (TextEditor::TextBlockUserData::findPreviousBlockOpenParenthesis(&tc)) { const QString text = tc.block().text(); int indent = ts.columnAt(text, ts.firstNonSpace(text)); |