diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-09-26 11:57:06 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-09-26 19:33:22 +1000 |
commit | 92183de29edab53ccdfb99ddcfaa6fc2c359d925 (patch) | |
tree | 1f0bad515269b16d76c1687a754bdb8173a5c312 /pkg/gui/context.go | |
parent | 8dae54ab8ca41c6334c8c664d62b43d487b2914a (diff) |
more lenient handling of views not existing
Diffstat (limited to 'pkg/gui/context.go')
-rw-r--r-- | pkg/gui/context.go | 6 |
1 files 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 |