1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-12-01 22:52:01 +02:00

better logic for taking focus away from popup panels

This commit is contained in:
Jesse Duffield
2020-08-18 08:04:15 +10:00
parent 119d5be1a4
commit a12d18146c
5 changed files with 8 additions and 28 deletions

View File

@@ -167,19 +167,7 @@ func (gui *Gui) prepareConfirmationPanel(currentView *gocui.View, title, prompt
return confirmationView, nil
}
func (gui *Gui) onNewPopupPanel() {
viewNames := []string{
"commitMessage",
"credentials",
"menu",
}
for _, viewName := range viewNames {
_, _ = gui.g.SetViewOnBottom(viewName) // TODO: investigate
}
}
func (gui *Gui) createPopupPanel(opts createPopupPanelOpts) error {
gui.onNewPopupPanel()
gui.g.Update(func(g *gocui.Gui) error {
// delete the existing confirmation panel if it exists
if view, _ := g.View("confirmation"); view != nil {