From aece5ce950526be3b0b4d541446eebb12a94fa14 Mon Sep 17 00:00:00 2001 From: Aleksey Pivovarov Date: Thu, 11 Dec 2014 20:35:47 +0300 Subject: [PATCH] diff: "next difference" should change file only on second press --- .../util/diff/impl/CacheDiffRequestChainProcessor.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/platform/diff-impl/src/com/intellij/openapi/util/diff/impl/CacheDiffRequestChainProcessor.java b/platform/diff-impl/src/com/intellij/openapi/util/diff/impl/CacheDiffRequestChainProcessor.java index 5827246d8c85..80230c97ca62 100644 --- a/platform/diff-impl/src/com/intellij/openapi/util/diff/impl/CacheDiffRequestChainProcessor.java +++ b/platform/diff-impl/src/com/intellij/openapi/util/diff/impl/CacheDiffRequestChainProcessor.java @@ -370,8 +370,8 @@ public abstract class CacheDiffRequestChainProcessor implements Disposable { return; } - if (iterable != null && myIterationState != IterationState.NEXT) { - iterable.notify("Press again to go to the next file"); // TODO: provide "change" word in chain UserData - for tests/etc + if (myIterationState != IterationState.NEXT) { + if (iterable != null) iterable.notify("Press again to go to the next file"); // TODO: provide "change" word in chain UserData - for tests/etc myIterationState = IterationState.NEXT; return; } @@ -413,8 +413,8 @@ public abstract class CacheDiffRequestChainProcessor implements Disposable { return; } - if (iterable != null && myIterationState != IterationState.PREV) { - iterable.notify("Press again to go to the previous file"); + if (myIterationState != IterationState.PREV) { + if (iterable != null) iterable.notify("Press again to go to the previous file"); myIterationState = IterationState.PREV; return; }