diff --git a/platform/lang-impl/src/com/intellij/formatting/FormatProcessor.java b/platform/lang-impl/src/com/intellij/formatting/FormatProcessor.java index bd09116f7fdd..cbe4459396db 100644 --- a/platform/lang-impl/src/com/intellij/formatting/FormatProcessor.java +++ b/platform/lang-impl/src/com/intellij/formatting/FormatProcessor.java @@ -70,7 +70,7 @@ public class FormatProcessor { myWrapState = new WrapBlocksState(builder, blockIndentOptions); FormatTextRanges ranges = options.myAffectedRanges; - if (ranges != null && Registry.is("smart.reformat.vcs.changes")) { + if (ranges != null && options.myReformatContext && Registry.is("smart.reformat.vcs.changes")) { AdjustFormatRangesState adjustRangesState = new AdjustFormatRangesState(block, ranges); myStateProcessor = new StateProcessor(adjustRangesState); myStateProcessor.setNextState(myWrapState);