summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2016-10-04 01:39:48 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2016-10-04 01:39:48 +0900
commit51f532697ebd73f7e48a73b0fe2d2bf62271bcc5 (patch)
treedb1155205d47b40cf9e7b6ec0d1f8c1b158bd6d8
parent01b88539ba912da4f49cfba48e2a736c04ec6006 (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.go2
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 {