forked from qt-creator/qt-creator
QmlJS: Fix auto-indent after an opening brace placed on a new line
Left brace wasn't handled in the expression_maybe_continuation state of qml/js code formatter. It led to expression_or_objectdefinition could not be continued on a new line. Task-number: QTCREATORBUG-12326 Change-Id: Id8fcaa586000008fce72c7c0c03ed1739b1c7aa1 Reviewed-by: Marco Benelli <marco.benelli@qt.io>
This commit is contained in:
committed by
Tim Jenssen
parent
657eba59f1
commit
1872cff611
@@ -300,8 +300,9 @@ void CodeFormatter::recalculateStateAfter(const QTextBlock &block)
|
||||
case Question:
|
||||
case Delimiter:
|
||||
case LeftBracket:
|
||||
case LeftParenthesis: leave(); continue;
|
||||
default: leave(true); continue;
|
||||
case LeftParenthesis:
|
||||
case LeftBrace: leave(); continue;
|
||||
default: leave(true); continue;
|
||||
} break;
|
||||
|
||||
case paren_open:
|
||||
|
Reference in New Issue
Block a user