mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-12-01 22:52:01 +02:00
Call getDisplayStrings with a valid range of model indices
It's nicer if clients can rely on the indices being valid, and don't have to clamp themselves.
This commit is contained in:
@@ -247,7 +247,7 @@ func TestGetCommitListDisplayStrings(t *testing.T) {
|
||||
{Name: "commit5", Sha: "sha5", Parents: []string{"sha7"}},
|
||||
},
|
||||
startIdx: 1,
|
||||
endIdx: 11,
|
||||
endIdx: 5,
|
||||
showGraph: true,
|
||||
bisectInfo: git_commands.NewNullBisectInfo(),
|
||||
cherryPickedCommitShaSet: set.New[string](),
|
||||
@@ -312,7 +312,7 @@ func TestGetCommitListDisplayStrings(t *testing.T) {
|
||||
{Name: "commit5", Sha: "sha5", Parents: []string{"sha7"}},
|
||||
},
|
||||
startIdx: 4,
|
||||
endIdx: 6,
|
||||
endIdx: 5,
|
||||
showGraph: true,
|
||||
bisectInfo: git_commands.NewNullBisectInfo(),
|
||||
cherryPickedCommitShaSet: set.New[string](),
|
||||
@@ -351,7 +351,7 @@ func TestGetCommitListDisplayStrings(t *testing.T) {
|
||||
{Name: "commit3", Sha: "sha3", Parents: []string{"sha4"}},
|
||||
},
|
||||
startIdx: 0,
|
||||
endIdx: 5,
|
||||
endIdx: 3,
|
||||
showGraph: true,
|
||||
bisectInfo: git_commands.NewNullBisectInfo(),
|
||||
cherryPickedCommitShaSet: set.New[string](),
|
||||
|
||||
Reference in New Issue
Block a user