mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
add global controller
This commit is contained in:
@ -222,6 +222,7 @@ type Controllers struct {
|
||||
Bisect *controllers.BisectController
|
||||
Undo *controllers.UndoController
|
||||
Sync *controllers.SyncController
|
||||
Global *controllers.GlobalController
|
||||
}
|
||||
|
||||
type listPanelState struct {
|
||||
@ -591,6 +592,10 @@ func (gui *Gui) resetControllers() {
|
||||
|
||||
gui.Controllers = Controllers{
|
||||
Submodules: submodulesController,
|
||||
Global: controllers.NewGlobalController(
|
||||
controllerCommon,
|
||||
osCommand,
|
||||
),
|
||||
Files: controllers.NewFilesController(
|
||||
controllerCommon,
|
||||
gui.State.Contexts.Files,
|
||||
@ -674,6 +679,7 @@ func (gui *Gui) resetControllers() {
|
||||
}
|
||||
|
||||
gui.State.Contexts.Submodules.AddKeybindingsFn(gui.Controllers.Submodules.GetKeybindings)
|
||||
gui.Controllers.Files.Attach(gui.State.Contexts.Files)
|
||||
gui.State.Contexts.Files.AddKeybindingsFn(gui.Controllers.Files.GetKeybindings)
|
||||
gui.State.Contexts.Tags.AddKeybindingsFn(gui.Controllers.Tags.GetKeybindings)
|
||||
// TODO: commit to one name here: local commits or branch commits
|
||||
|
Reference in New Issue
Block a user