From 2b0d85f3965dfc525cecd68f2bacdf21a9cd3836 Mon Sep 17 00:00:00 2001 From: Yaroslav Lepenkin Date: Thu, 30 Jun 2016 18:41:15 +0300 Subject: [PATCH] [formatter] performat ranges adjusting only in "reformat context" mode --- .../lang-impl/src/com/intellij/formatting/FormatProcessor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);