Skip to content

Commit

Permalink
fix: Disable jumping to window when confirmation is active
Browse files Browse the repository at this point in the history
  • Loading branch information
CI authored and CI committed Feb 18, 2025
1 parent e15e495 commit 2afdc95
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/gui/controllers/jump_to_side_window_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 2afdc95

Please sign in to comment.