mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 12:25:47 +02:00
Add IGuiCommon.GetViewBufferManagerForView
So that we don't have to pass the map to controllers.
This commit is contained in:
parent
b97dd6bc3f
commit
7b96615792
7 changed files with 30 additions and 17 deletions
|
@ -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]()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue