1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-11-25 22:32:13 +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

@@ -578,6 +578,15 @@ func (gui *Gui) resetState(startArgs appTypes.StartArgs) types.Context {
return initialContext(contextTree, startArgs)
}
func (self *Gui) getViewBufferManagerForView(view *gocui.View) *tasks.ViewBufferManager {
manager, ok := self.viewBufferManagerMap[view.Name()]
if !ok {
return nil
}
return manager
}
func initialWindowViewNameMap(contextTree *context.ContextTree) *utils.ThreadSafeMap[string, string] {
result := utils.NewThreadSafeMap[string, string]()