From c3d5798c6c1be666cb8c11a03a7b054bb934bef6 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Fri, 9 Aug 2024 14:30:13 +0200 Subject: [PATCH] Fix early exit condition I don't know what this condition is supposed to guard against, or whether we really need it (it was added in 06ca71e955, and the commit message of that commit only says "fix bug"). But if we do need it, then it seems that `>=` is more correct than `>`. --- pkg/gui/presentation/commits.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/gui/presentation/commits.go b/pkg/gui/presentation/commits.go index f9bdb4eb7..234a84e5c 100644 --- a/pkg/gui/presentation/commits.go +++ b/pkg/gui/presentation/commits.go @@ -65,7 +65,7 @@ func GetCommitListDisplayStrings( return nil } - if startIdx > len(commits) { + if startIdx >= len(commits) { return nil }