diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ChangesViewManager.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ChangesViewManager.java index c8f951900fb0..9ebc4ec1a298 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ChangesViewManager.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ChangesViewManager.java @@ -481,6 +481,8 @@ public class ChangesViewManager implements ChangesViewEx, } }; editorPreview.setEscapeHandler(() -> { + editorPreview.closePreview(); + ToolWindow toolWindow = getToolWindowFor(myProject, LOCAL_CHANGES); if (toolWindow != null) toolWindow.activate(null); }); diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelvedChangesViewManager.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelvedChangesViewManager.java index 4c93bc3791b9..ba9f1f6a4c00 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelvedChangesViewManager.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelvedChangesViewManager.java @@ -752,6 +752,8 @@ public class ShelvedChangesViewManager implements Disposable { } }; editorPreview.setEscapeHandler(() -> { + editorPreview.closePreview(); + ToolWindow toolWindow = getToolWindowFor(myProject, SHELF); if (toolWindow != null) toolWindow.activate(null); });