diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2022-02-05 11:00:57 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2022-03-17 19:13:40 +1100 |
commit | 8e3484d8e98faf12f8395eaf5f9e8381f77a8e52 (patch) | |
tree | 66334c4a08240e3f7dad0926bacea2a0e5b6def3 /pkg/gui/gui.go | |
parent | 226985bf7602763f7578ef236bdc4cec3a1494e9 (diff) |
add global controller
Diffstat (limited to 'pkg/gui/gui.go')
-rw-r--r-- | pkg/gui/gui.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go index 116fcee2d..2b4fe66ca 100644 --- a/pkg/gui/gui.go +++ b/pkg/gui/gui.go @@ -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 |