summaryrefslogtreecommitdiffstats
path: root/pkg/gui
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2021-11-02 21:33:22 +1100
committerJesse Duffield <jessedduffield@gmail.com>2021-11-05 07:58:21 +1100
commit06ca71e955d58128773e2ab4b5db173b4609497f (patch)
tree4610247a0ed695a039779c60aa79405395a3558a /pkg/gui
parent308a3b51b39227e4d14d330a8c285bcf2a18ebc9 (diff)
fix bug
Diffstat (limited to 'pkg/gui')
-rw-r--r--pkg/gui/presentation/commits.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/gui/presentation/commits.go b/pkg/gui/presentation/commits.go
index c4a02df29..68cd554fa 100644
--- a/pkg/gui/presentation/commits.go
+++ b/pkg/gui/presentation/commits.go
@@ -57,6 +57,9 @@ func GetCommitListDisplayStrings(
pipeSetCache[cacheKey] = pipeSets
}
+ if startIdx > len(commits) {
+ return nil
+ }
end := startIdx + length
if end > len(commits)-1 {
end = len(commits) - 1