diff --git a/platform/lang-impl/src/com/intellij/formatting/engine/BlockIndentOptions.java b/platform/lang-impl/src/com/intellij/formatting/engine/BlockIndentOptions.java index a361f25f13a0..14148594d151 100644 --- a/platform/lang-impl/src/com/intellij/formatting/engine/BlockIndentOptions.java +++ b/platform/lang-impl/src/com/intellij/formatting/engine/BlockIndentOptions.java @@ -43,18 +43,19 @@ public class BlockIndentOptions { @NotNull public CommonCodeStyleSettings.IndentOptions getIndentOptions(@NotNull AbstractBlockWrapper block) { - if (!myIndentOptions.isOverrideLanguageOptions()) { - final Language language = block.getLanguage(); - if (language != null) { - final CommonCodeStyleSettings commonSettings = mySettings.getCommonSettings(language); - if (commonSettings != null) { - final CommonCodeStyleSettings.IndentOptions result = commonSettings.getIndentOptions(); - if (result != null) { - return result; - } + if (myIndentOptions.isOverrideLanguageOptions()) return myIndentOptions; + + final Language language = block.getLanguage(); + if (language != null) { + final CommonCodeStyleSettings commonSettings = mySettings.getCommonSettings(language); + if (commonSettings != null) { + final CommonCodeStyleSettings.IndentOptions result = commonSettings.getIndentOptions(); + if (result != null) { + return result; } } } + return myIndentOptions; }