1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-12-01 22:52:01 +02:00

standardise helper args

This commit is contained in:
Jesse Duffield
2023-03-23 12:53:18 +11:00
parent 43251e7275
commit fc91ef6a59
19 changed files with 197 additions and 323 deletions

View File

@@ -6,14 +6,12 @@ import (
)
type ViewHelper struct {
c *HelperCommon
contexts *context.ContextTree
c *HelperCommon
}
func NewViewHelper(c *HelperCommon, contexts *context.ContextTree) *ViewHelper {
return &ViewHelper{
c: c,
contexts: contexts,
c: c,
}
}
@@ -23,7 +21,7 @@ func (self *ViewHelper) ContextForView(viewName string) (types.Context, bool) {
return nil, false
}
for _, context := range self.contexts.Flatten() {
for _, context := range self.c.Contexts().Flatten() {
if context.GetViewName() == view.Name() {
return context, true
}