mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-10 07:36:27 -04:00
more lenient handling of views not existing
This commit is contained in:
parent
8dae54ab8c
commit
92183de29e
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue