diff options
Diffstat (limited to 'pkg/gui/gui_common.go')
-rw-r--r-- | pkg/gui/gui_common.go | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/pkg/gui/gui_common.go b/pkg/gui/gui_common.go index 8db398489..ba9540178 100644 --- a/pkg/gui/gui_common.go +++ b/pkg/gui/gui_common.go @@ -3,18 +3,16 @@ package gui import ( "github.com/jesseduffield/lazygit/pkg/commands/oscommands" "github.com/jesseduffield/lazygit/pkg/config" - "github.com/jesseduffield/lazygit/pkg/gui/controllers" - "github.com/jesseduffield/lazygit/pkg/gui/popup" "github.com/jesseduffield/lazygit/pkg/gui/types" ) // hacking this by including the gui struct for now until we split more things out type guiCommon struct { gui *Gui - popup.IPopupHandler + types.IPopupHandler } -var _ controllers.IGuiCommon = &guiCommon{} +var _ types.IGuiCommon = &guiCommon{} func (self *guiCommon) LogAction(msg string) { self.gui.LogAction(msg) @@ -44,6 +42,10 @@ func (self *guiCommon) PopContext() error { return self.gui.returnFromContext() } +func (self *guiCommon) CurrentContext() types.Context { + return self.gui.currentContext() +} + func (self *guiCommon) GetAppState() *config.AppState { return self.gui.Config.GetAppState() } @@ -51,3 +53,11 @@ func (self *guiCommon) GetAppState() *config.AppState { func (self *guiCommon) SaveAppState() error { return self.gui.Config.SaveAppState() } + +func (self *guiCommon) Render() { + self.gui.render() +} + +func (self *guiCommon) OpenSearch() { + _ = self.gui.handleOpenSearch(self.gui.currentViewName()) +} |