diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2016-10-04 01:39:48 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2016-10-04 01:39:48 +0900 |
commit | 51f532697ebd73f7e48a73b0fe2d2bf62271bcc5 (patch) | |
tree | db1155205d47b40cf9e7b6ec0d1f8c1b158bd6d8 | |
parent | 01b88539ba912da4f49cfba48e2a736c04ec6006 (diff) |
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.
-rw-r--r-- | src/terminal.go | 2 |
1 files changed, 1 insertions, 1 deletions
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 { |