summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pkg/gui/view_helpers.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/pkg/gui/view_helpers.go b/pkg/gui/view_helpers.go
index 7426ce18f..97f394ec3 100644
--- a/pkg/gui/view_helpers.go
+++ b/pkg/gui/view_helpers.go
@@ -146,10 +146,25 @@ func (gui *Gui) goToSideView(sideViewName string) func(g *gocui.Gui, v *gocui.Vi
gui.Log.Error(err)
return nil
}
+ err = gui.closePopupPanels()
+ if err != nil {
+ gui.Log.Error(err)
+ return nil
+ }
return gui.switchFocus(g, nil, view)
}
}
+func (gui *Gui) closePopupPanels() error {
+ gui.onNewPopupPanel()
+ err := gui.closeConfirmationPrompt(gui.g)
+ if err != nil {
+ gui.Log.Error(err)
+ return err
+ }
+ return nil
+}
+
// pass in oldView = nil if you don't want to be able to return to your old view
// TODO: move some of this logic into our onFocusLost and onFocus hooks
func (gui *Gui) switchFocus(g *gocui.Gui, oldView, newView *gocui.View) error {