diff options
Diffstat (limited to 'pkg/gui/controllers.go')
-rw-r--r-- | pkg/gui/controllers.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/pkg/gui/controllers.go b/pkg/gui/controllers.go index 78943e798..a17592513 100644 --- a/pkg/gui/controllers.go +++ b/pkg/gui/controllers.go @@ -99,6 +99,7 @@ func (gui *Gui) resetHelpersAndControllers() { modeHelper, appStatusHelper, ), + Search: helpers.NewSearchHelper(helperCommon), } gui.CustomCommandsClient = custom_commands.NewClient( @@ -162,6 +163,16 @@ func (gui *Gui) resetHelpersAndControllers() { sideWindowControllerFactory := controllers.NewSideWindowControllerFactory(common) + filterControllerFactory := controllers.NewFilterControllerFactory(common) + for _, context := range gui.c.Context().AllFilterable() { + controllers.AttachControllers(context, filterControllerFactory.Create(context)) + } + + searchControllerFactory := controllers.NewSearchControllerFactory(common) + for _, context := range gui.c.Context().AllSearchable() { + controllers.AttachControllers(context, searchControllerFactory.Create(context)) + } + // allow for navigating between side window contexts for _, context := range []types.Context{ gui.State.Contexts.Status, @@ -323,6 +334,10 @@ func (gui *Gui) resetHelpersAndControllers() { suggestionsController, ) + controllers.AttachControllers(gui.State.Contexts.Search, + controllers.NewSearchPromptController(common), + ) + controllers.AttachControllers(gui.State.Contexts.Global, syncController, undoController, |