[formatter] performat ranges adjusting only in "reformat context" mode

This commit is contained in:
Yaroslav Lepenkin
2016-06-30 19:03:15 +03:00
parent 166464a38f
commit 2b0d85f396
@@ -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);