Fix half page down bug
This commit is contained in:
parent
eadfbf8469
commit
cece846297
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue