mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-03-17 21:18:31 +02:00
defend against view not yet having a context defined against it
This commit is contained in:
parent
41527270ed
commit
94d66b267d
@ -181,7 +181,12 @@ func (gui *Gui) activateContext(c types.Context, opts ...types.OnFocusOpts) erro
|
||||
if err != nil {
|
||||
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.setViewTabForContext(c)
|
||||
|
Loading…
x
Reference in New Issue
Block a user