From 0bb48934e8cd911b6ed63236d8ada56280f8c21d Mon Sep 17 00:00:00 2001 From: dragonmacher <48328597+dragonmacher@users.noreply.github.com> Date: Fri, 7 Mar 2025 12:55:53 -0500 Subject: [PATCH] Fixed escape key binding collision with closing windows by only enabling the action when there is a selection --- .../app/plugin/core/codebrowser/CodeBrowserSelectionPlugin.java | 1 + 1 file changed, 1 insertion(+) diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/codebrowser/CodeBrowserSelectionPlugin.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/codebrowser/CodeBrowserSelectionPlugin.java index 9e5996aa9e..1511e7e79f 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/codebrowser/CodeBrowserSelectionPlugin.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/codebrowser/CodeBrowserSelectionPlugin.java @@ -92,6 +92,7 @@ public class CodeBrowserSelectionPlugin extends Plugin { .helpLocation(new HelpLocation(HelpTopics.SELECTION, "Clear Selection")) .withContext(CodeViewerActionContext.class, true) .inWindow(ActionBuilder.When.CONTEXT_MATCHES) + .enabledWhen(c -> c.hasSelection()) .onAction(c -> ((CodeViewerProvider) c.getComponentProvider()) .setSelection(new ProgramSelection())) .buildAndInstall(tool);