From 9a30fa882b36119a3fc74aa1ac78d5e3675adc42 Mon Sep 17 00:00:00 2001 From: Vladimir Matveev Date: Wed, 5 Nov 2014 15:29:51 -0800 Subject: [PATCH] do not indent tokens with errors --- src/services/formatting/format.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/formatting/format.ts b/src/services/formatting/format.ts index e96608bbf71..fb18792d05b 100644 --- a/src/services/formatting/format.ts +++ b/src/services/formatting/format.ts @@ -646,7 +646,7 @@ module ts.formatting { } } } - if (isTokenInRange) { + if (isTokenInRange && !rangeContainsError(currentTokenInfo.token)) { insertIndentation(currentTokenInfo.token.pos, indentation.getEffectiveIndentation(tokenStart.line, currentTokenInfo.token.kind), lineAdded); } }