From fbce4f4142f5e31a5a15bf597916fc08ff4518db Mon Sep 17 00:00:00 2001 From: Aleksey Pivovarov Date: Mon, 26 Mar 2018 17:42:30 +0300 Subject: [PATCH] diff: do not ignore passed DiffComputer follow-up: 765bdf8cbe53945bab40e57f477d89ddbbef8ce8 --- .../tools/util/text/SimpleTextDiffProvider.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/platform/diff-impl/src/com/intellij/diff/tools/util/text/SimpleTextDiffProvider.java b/platform/diff-impl/src/com/intellij/diff/tools/util/text/SimpleTextDiffProvider.java index 630a90b2cb86..86712e0847dd 100644 --- a/platform/diff-impl/src/com/intellij/diff/tools/util/text/SimpleTextDiffProvider.java +++ b/platform/diff-impl/src/com/intellij/diff/tools/util/text/SimpleTextDiffProvider.java @@ -98,10 +98,16 @@ public class SimpleTextDiffProvider extends TwosideTextDiffProviderBase implemen } ComparisonManagerImpl comparisonManager = ComparisonManagerImpl.getInstanceImpl(); - if (diffComputer != null || linesRanges == null) { - List fragments = comparisonManager.compareLinesInner(text1, text2, lineOffsets1, lineOffsets2, - policy, innerFragments, indicator); - return Collections.singletonList(fragments); + if (linesRanges == null) { + if (diffComputer != null) { + List fragments = diffComputer.compute(text1, text2, policy, innerFragments, indicator); + return Collections.singletonList(fragments); + } + else { + List fragments = comparisonManager.compareLinesInner(text1, text2, lineOffsets1, lineOffsets2, + policy, innerFragments, indicator); + return Collections.singletonList(fragments); + } } else { List> result = new ArrayList<>();