mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-04-21 12:16:54 +02: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)
|
gui.setViewTabForContext(c)
|
||||||
|
|
||||||
if _, err := gui.g.SetCurrentView(viewName); err != nil {
|
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 {
|
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
|
// if the new context's view was previously displaying another context, render the new context
|
||||||
|
Loading…
x
Reference in New Issue
Block a user