Fix half page down bug

This commit is contained in:
Zachary Yedidia 2016-04-05 12:50:07 -04:00
parent eadfbf8469
commit cece846297

View file

@ -179,7 +179,9 @@ func (v *View) HalfPageDown() {
if len(v.buf.lines)-(v.topline+v.height) > v.height/2 {
v.ScrollDown(v.height / 2)
} else {
v.topline = len(v.buf.lines) - v.height
if len(v.buf.lines) >= v.height {
v.topline = len(v.buf.lines) - v.height
}
}
}