From f3a91f0a40ea7c94c5b95625794191475d60bd76 Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Thu, 14 May 2020 20:57:24 -0400 Subject: [PATCH] For now, keep selection within current page --- ui/stash.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/stash.go b/ui/stash.go index c619c4e..7b10661 100644 --- a/ui/stash.go +++ b/ui/stash.go @@ -120,7 +120,7 @@ func stashUpdate(msg boba.Msg, m stashModel) (stashModel, boba.Cmd) { case "j": fallthrough case "down": - m.index = min(m.paginator.PerPage-1, m.index+1) + m.index = min(m.paginator.ItemsOnPage(len(m.documents))-1, m.index+1) return m, nil case "enter":