From aaf53ac69413d0ddde33f3a3d10a36e7b2962cf9 Mon Sep 17 00:00:00 2001 From: leo Date: Mon, 19 May 2025 10:08:37 +0800 Subject: [PATCH] enhance: try to cancel switcher first then other popup Signed-off-by: leo --- src/Views/Launcher.axaml.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Views/Launcher.axaml.cs b/src/Views/Launcher.axaml.cs index be4cdf5b..5759c87e 100644 --- a/src/Views/Launcher.axaml.cs +++ b/src/Views/Launcher.axaml.cs @@ -264,8 +264,11 @@ namespace SourceGit.Views } else if (e.Key == Key.Escape) { - vm.ActivePage.CancelPopup(); - vm.CancelSwitcher(); + if (vm.Switcher != null) + vm.CancelSwitcher(); + else + vm.ActivePage.CancelPopup(); + e.Handled = true; return; }