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,9 +179,11 @@ func (v *View) HalfPageDown() {
if len(v.buf.lines)-(v.topline+v.height) > v.height/2 {
v.ScrollDown(v.height / 2)
} else {
if len(v.buf.lines) >= v.height {
v.topline = len(v.buf.lines) - v.height
}
}
}
// CanClose returns whether or not the view can be closed
// If there are unsaved changes, the user will be asked if the view can be closed