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

Adjust maximum scroll offset

It was possible that a few lines at the bottom may not be visible if
there are lines above that span multiple lines.
This commit is contained in:
Junegunn Choi
2016-10-04 01:39:48 +09:00
parent 01b88539ba
commit 51f532697e

View File

@@ -1188,7 +1188,7 @@ func (t *Terminal) Loop() {
}
scrollPreview := func(amount int) {
t.previewer.offset = util.Constrain(
t.previewer.offset+amount, 0, t.previewer.lines-t.pwindow.Height)
t.previewer.offset+amount, 0, t.previewer.lines-1)
req(reqPreviewRefresh)
}
for key, ret := range t.expect {