mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-31 14:24:25 +03:00
standardise controller helper methods
This commit is contained in:
@ -49,7 +49,7 @@ func (self *SnakeController) GetKeybindings(opts types.KeybindingsOpts) []*types
|
||||
}
|
||||
|
||||
func (self *SnakeController) Context() types.Context {
|
||||
return self.contexts.Snake
|
||||
return self.c.Contexts().Snake
|
||||
}
|
||||
|
||||
func (self *SnakeController) GetOnFocus() func(types.OnFocusOpts) error {
|
||||
@ -62,7 +62,7 @@ func (self *SnakeController) GetOnFocus() func(types.OnFocusOpts) error {
|
||||
func (self *SnakeController) GetOnFocusLost() func(types.OnFocusLostOpts) error {
|
||||
return func(types.OnFocusLostOpts) error {
|
||||
self.helpers.Snake.ExitGame()
|
||||
self.helpers.Window.MoveToTopOfWindow(self.contexts.Submodules)
|
||||
self.helpers.Window.MoveToTopOfWindow(self.c.Contexts().Submodules)
|
||||
return nil
|
||||
}
|
||||
}
|
||||
@ -75,5 +75,5 @@ func (self *SnakeController) SetDirection(direction snake.Direction) func() erro
|
||||
}
|
||||
|
||||
func (self *SnakeController) Escape() error {
|
||||
return self.c.PushContext(self.contexts.Submodules)
|
||||
return self.c.PushContext(self.c.Contexts().Submodules)
|
||||
}
|
||||
|
Reference in New Issue
Block a user