mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-11-25 22:32:13 +02:00
defend against view not yet having a context defined against it
This commit is contained in:
@@ -181,7 +181,12 @@ func (gui *Gui) activateContext(c types.Context, opts ...types.OnFocusOpts) erro
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
originalViewContextKey := gui.State.ViewContextMap.Get(viewName).GetKey()
|
|
||||||
|
originalViewContext := gui.State.ViewContextMap.Get(viewName)
|
||||||
|
var originalViewContextKey types.ContextKey = ""
|
||||||
|
if originalViewContext != nil {
|
||||||
|
originalViewContextKey = originalViewContext.GetKey()
|
||||||
|
}
|
||||||
|
|
||||||
gui.setWindowContext(c)
|
gui.setWindowContext(c)
|
||||||
gui.setViewTabForContext(c)
|
gui.setViewTabForContext(c)
|
||||||
|
|||||||
Reference in New Issue
Block a user