Esc should cancel merge without confirmation if no changes were made

IDEA-182230 followup - fixes IDEA-191716
This commit is contained in:
Dmitriy Smirnov
2018-05-21 20:04:13 +03:00
parent beadcfbe4b
commit 7b6fde3e05
@@ -135,7 +135,12 @@ public class TextMergeViewer implements MergeTool.MergeViewer {
components.statusPanel = init.statusPanel;
components.toolbarActions = init.toolbarActions;
components.closeHandler = () -> MergeUtil.showExitWithoutApplyingChangesDialog(this, myMergeRequest, myMergeContext);
components.closeHandler = () -> {
if (myViewer.myContentModified)
return MergeUtil.showExitWithoutApplyingChangesDialog(this, myMergeRequest, myMergeContext);
else
return true;
};
return components;
}