From 7b60e3005e31b5603475ac03f0013a8c8bedfcbc Mon Sep 17 00:00:00 2001 From: Konstantin Nisht Date: Wed, 8 Dec 2021 21:24:58 +0300 Subject: [PATCH] [groovy] Fix a test GitOrigin-RevId: 4a526cb0f6c52751f0ef88c6814e3b84aa65e98a --- .../groovy/formatter/processors/GroovyIndentProcessor.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/groovy/src/org/jetbrains/plugins/groovy/formatter/processors/GroovyIndentProcessor.java b/plugins/groovy/src/org/jetbrains/plugins/groovy/formatter/processors/GroovyIndentProcessor.java index d8e273ca37bf..9f8085cce238 100644 --- a/plugins/groovy/src/org/jetbrains/plugins/groovy/formatter/processors/GroovyIndentProcessor.java +++ b/plugins/groovy/src/org/jetbrains/plugins/groovy/formatter/processors/GroovyIndentProcessor.java @@ -222,7 +222,9 @@ public class GroovyIndentProcessor extends GroovyElementVisitor { myResult = getContinuationWithoutFirstIndent(); } else if (TokenSets.BLOCK_SET.contains(myChildType)) { - myResult = getContinuationWithoutFirstIndent(); + if (myChild == ifStatement.getCondition()) { + myResult = getContinuationWithoutFirstIndent(); + } } else if (myChild == ifStatement.getThenBranch()) { myResult = getNormalIndent();