summaryrefslogtreecommitdiff
path: root/src/plugins/qmljstools/qmljsindenter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/qmljstools/qmljsindenter.cpp')
-rw-r--r--src/plugins/qmljstools/qmljsindenter.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/qmljstools/qmljsindenter.cpp b/src/plugins/qmljstools/qmljsindenter.cpp
index 13ffc9621a..b16ae56889 100644
--- a/src/plugins/qmljstools/qmljsindenter.cpp
+++ b/src/plugins/qmljstools/qmljsindenter.cpp
@@ -70,6 +70,8 @@ void Indenter::indentBlock(QTextDocument *doc,
codeFormatter.updateStateUntil(block);
const int depth = codeFormatter.indentFor(block);
+ if (depth == -1)
+ return;
if (isElectricCharacter(typedChar)) {
// only reindent the current line when typing electric characters if the