1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-11-29 22:48:24 +02:00

Add IGuiCommon.GetViewBufferManagerForView

So that we don't have to pass the map to controllers.
This commit is contained in:
Stefan Haller
2025-04-03 18:00:13 +02:00
parent b97dd6bc3f
commit 7b96615792
7 changed files with 30 additions and 17 deletions

View File

@@ -7,6 +7,7 @@ import (
"github.com/jesseduffield/lazygit/pkg/config"
"github.com/jesseduffield/lazygit/pkg/gui/controllers/helpers"
"github.com/jesseduffield/lazygit/pkg/gui/types"
"github.com/jesseduffield/lazygit/pkg/tasks"
)
// hacking this by including the gui struct for now until we split more things out
@@ -128,6 +129,10 @@ func (self *guiCommon) MainViewPairs() types.MainViewPairs {
}
}
func (self *guiCommon) GetViewBufferManagerForView(view *gocui.View) *tasks.ViewBufferManager {
return self.gui.getViewBufferManagerForView(view)
}
func (self *guiCommon) State() types.IStateAccessor {
return self.gui.stateAccessor
}