1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-11-26 09:00:57 +02:00

fix specs

This commit is contained in:
Jesse Duffield 2020-02-14 23:45:38 +11:00
parent 5b9996b16f
commit 2e1344f611
2 changed files with 4 additions and 1 deletions

View File

@ -174,6 +174,9 @@ func getPadWidths(stringArrays [][]string) []int {
maxWidth = len(stringArray)
}
}
if maxWidth-1 < 0 {
return []int{}
}
padWidths := make([]int, maxWidth-1)
for i := range padWidths {
for _, strings := range stringArrays {

View File

@ -276,8 +276,8 @@ func TestRenderDisplayableList(t *testing.T) {
Displayable(&myDisplayable{[]string{"b", "c"}}),
},
false,
"a \nb c",
"",
"Each item must return the same number of strings to display",
},
{
[]Displayable{