diff --git a/pkg/gui/subprocess.go b/pkg/gui/subprocess.go index 61d3e1e9..ce9f4015 100644 --- a/pkg/gui/subprocess.go +++ b/pkg/gui/subprocess.go @@ -21,6 +21,8 @@ func (gui *Gui) RunWithSubprocesses() error { if err == gocui.ErrQuit { break } else if err == gui.Errors.ErrSubProcess { + // pop here so we don't stack up view names + gui.popPreviousView() // preparing the state for when we return gui.pushPreviousView(gui.currentViewName()) // giving goEvery goroutines time to finish @@ -30,8 +32,6 @@ func (gui *Gui) RunWithSubprocesses() error { return err } - // pop here so we don't stack up view names - gui.popPreviousView() // ensuring we render e.g. the logs of the currently selected item upon return gui.State.Panels.Main.ObjectKey = "" } else {