From e402b05570e426b9e34db8fd2c4abff292395acd Mon Sep 17 00:00:00 2001 From: Felix Angell Date: Wed, 9 May 2018 11:34:48 +0100 Subject: [PATCH] round up when calculating visible lines for scroll down --- gui/buffer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/buffer.go b/gui/buffer.go index 2e2e1eb..957c650 100644 --- a/gui/buffer.go +++ b/gui/buffer.go @@ -618,7 +618,7 @@ func (b *Buffer) moveDown() { b.curs.move(offs, 1) - visibleLines := (int(b.h-b.ey) / int(last_h+pad)) + visibleLines := int(math.Ceil(float64(b.h-b.ey) / float64(last_h+pad))) if b.curs.y >= visibleLines && b.curs.y-b.cam.y == visibleLines { b.scrollDown(1)