From 51f532697ebd73f7e48a73b0fe2d2bf62271bcc5 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Tue, 4 Oct 2016 01:39:48 +0900 Subject: [PATCH] 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. --- src/terminal.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/terminal.go b/src/terminal.go index 59cb8a66..20e84414 100644 --- a/src/terminal.go +++ b/src/terminal.go @@ -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 {