From 92183de29edab53ccdfb99ddcfaa6fc2c359d925 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sat, 26 Sep 2020 11:57:06 +1000 Subject: [PATCH] more lenient handling of views not existing --- pkg/gui/context.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/gui/context.go b/pkg/gui/context.go index a7b887199..29f8be47e 100644 --- a/pkg/gui/context.go +++ b/pkg/gui/context.go @@ -477,11 +477,13 @@ func (gui *Gui) activateContext(c Context) error { gui.setViewTabForContext(c) if _, err := gui.g.SetCurrentView(viewName); err != nil { - return err + // if view no longer exists, pop again + return gui.returnFromContext() } if _, err := gui.g.SetViewOnTop(viewName); err != nil { - return err + // if view no longer exists, pop again + return gui.returnFromContext() } // if the new context's view was previously displaying another context, render the new context