mirror of
https://github.com/junegunn/fzf.git
synced 2025-08-11 02:02:01 -07:00
Fix index out of bounds error on scroll-down action
This commit is contained in:
@@ -4550,6 +4550,7 @@ func (t *Terminal) constrain() {
|
|||||||
maxLines := t.maxItems()
|
maxLines := t.maxItems()
|
||||||
|
|
||||||
// May need to try again after adjusting the offset
|
// May need to try again after adjusting the offset
|
||||||
|
t.offset = util.Max(0, t.offset) // Prevent -1
|
||||||
for tries := 0; tries < maxLines; tries++ {
|
for tries := 0; tries < maxLines; tries++ {
|
||||||
numItems := maxLines
|
numItems := maxLines
|
||||||
// How many items can be fit on screen including the current item?
|
// How many items can be fit on screen including the current item?
|
||||||
|
Reference in New Issue
Block a user