forked from qt-creator/qt-creator
Merge branch 'master' of git@scm.dev.nokia.troll.no:creator/mainline
This commit is contained in:
@@ -617,8 +617,10 @@ void ScriptEditor::indentBlock(QTextDocument *, QTextBlock block, QChar typedCha
|
|||||||
{
|
{
|
||||||
TextEditor::TabSettings ts = tabSettings();
|
TextEditor::TabSettings ts = tabSettings();
|
||||||
|
|
||||||
if (typedChar == QLatin1Char('}')) {
|
if (typedChar == QLatin1Char('}')
|
||||||
QTextCursor tc = textCursor();
|
|| ((typedChar == QChar::Null) && block.text().trimmed() == "}")) {
|
||||||
|
|
||||||
|
QTextCursor tc(block);
|
||||||
if (TextEditor::TextBlockUserData::findPreviousBlockOpenParenthesis(&tc)) {
|
if (TextEditor::TextBlockUserData::findPreviousBlockOpenParenthesis(&tc)) {
|
||||||
const QString text = tc.block().text();
|
const QString text = tc.block().text();
|
||||||
int indent = ts.columnAt(text, ts.firstNonSpace(text));
|
int indent = ts.columnAt(text, ts.firstNonSpace(text));
|
||||||
|
|||||||
Reference in New Issue
Block a user