Fix scrolling bug

This commit is contained in:
Zachary Yedidia
2016-03-12 17:29:08 -05:00
parent 757986ae3f
commit e3d629f2b5

View File

@@ -101,7 +101,7 @@ class View {
if (topline > 0)
topline--;
} else if (e.key == Key.mouseWheelDown) {
if (topline < buf.lines.length - height)
if (buf.lines.length > height && topline < buf.lines.length - height)
topline++;
} else {
if (e.key == Key.arrowUp) {