summaryrefslogtreecommitdiffstats
path: root/pkg/gui/context/remotes_context.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/gui/context/remotes_context.go')
-rw-r--r--pkg/gui/context/remotes_context.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/pkg/gui/context/remotes_context.go b/pkg/gui/context/remotes_context.go
index 402c1bef4..a194baec8 100644
--- a/pkg/gui/context/remotes_context.go
+++ b/pkg/gui/context/remotes_context.go
@@ -2,6 +2,7 @@ package context
import (
"github.com/jesseduffield/lazygit/pkg/commands/models"
+ "github.com/jesseduffield/lazygit/pkg/gui/presentation"
"github.com/jesseduffield/lazygit/pkg/gui/types"
)
@@ -15,13 +16,13 @@ var (
_ types.DiffableContext = (*RemotesContext)(nil)
)
-func NewRemotesContext(
- getDisplayStrings func(startIdx int, length int) [][]string,
-
- c *types.HelperCommon,
-) *RemotesContext {
+func NewRemotesContext(c *types.HelperCommon) *RemotesContext {
viewModel := NewBasicViewModel(func() []*models.Remote { return c.Model().Remotes })
+ getDisplayStrings := func(startIdx int, length int) [][]string {
+ return presentation.GetRemoteListDisplayStrings(c.Model().Remotes, c.Modes().Diffing.Ref)
+ }
+
return &RemotesContext{
BasicViewModel: viewModel,
ListContextTrait: &ListContextTrait{