mirror of
https://github.com/felixangell/phi.git
synced 2024-08-16 19:20:21 +03:00
round up when calculating visible lines for scroll down
This commit is contained in:
parent
c699dfc8b7
commit
e402b05570
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user