From a9553c494ef6012cc4c34bd469ff0f20ee2e2671 Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Mon, 24 Oct 2011 12:29:54 +0200 Subject: QmlJS indenter: Never touch indent of multi-line strings. Task-number: QTCREATORBUG-6368 Change-Id: Iae68427e429e625214bc0729aaaf313dc3371570 Reviewed-by: Fawzi Mohamed --- src/plugins/qmljstools/qmljsindenter.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/plugins/qmljstools/qmljsindenter.cpp') 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 -- cgit v1.2.1