m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-15 06:43:47 -05:00

Fix index out of bounds error on scroll-down action

This commit is contained in:
Junegunn Choi
2024-05-30 11:03:36 +09:00
parent 7405925952
commit 49b496269c

View File

@@ -4550,6 +4550,7 @@ func (t *Terminal) constrain() {
maxLines := t.maxItems()
// May need to try again after adjusting the offset
t.offset = util.Max(0, t.offset) // Prevent -1
for tries := 0; tries < maxLines; tries++ {
numItems := maxLines
// How many items can be fit on screen including the current item?