From 2afdc957f0a31fa8c1375c9a3d4a1aa6ddd97a7f Mon Sep 17 00:00:00 2001 From: CI Date: Mon, 17 Feb 2025 21:50:10 -0500 Subject: [PATCH] fix: Disable jumping to window when confirmation is active --- pkg/gui/controllers/jump_to_side_window_controller.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/gui/controllers/jump_to_side_window_controller.go b/pkg/gui/controllers/jump_to_side_window_controller.go index 39120eda89b..15b02e33cc5 100644 --- a/pkg/gui/controllers/jump_to_side_window_controller.go +++ b/pkg/gui/controllers/jump_to_side_window_controller.go @@ -4,6 +4,7 @@ import ( "log" "github.com/jesseduffield/gocui" + "github.com/jesseduffield/lazygit/pkg/gui/context" "github.com/jesseduffield/lazygit/pkg/gui/types" "github.com/samber/lo" ) @@ -49,6 +50,10 @@ func (self *JumpToSideWindowController) GetKeybindings(opts types.KeybindingsOpt func (self *JumpToSideWindowController) goToSideWindow(window string) func() error { return func() error { + if _, ok := self.c.Context().Current().(*context.ConfirmationContext); ok { + // Do not want to switch side windows until the confirmation is acknowledged. + return nil + } sideWindowAlreadyActive := self.c.Helpers().Window.CurrentWindow() == window if sideWindowAlreadyActive && self.c.UserConfig().Gui.SwitchTabsWithPanelJumpKeys { return self.nextTabFunc()