mirror of
https://github.com/Hopiu/micro.git
synced 2026-03-24 09:50:24 +00:00
Add a bit of "padding" to relocate
This commit is contained in:
parent
6eeda5d21f
commit
bbcd33d9fd
1 changed files with 2 additions and 2 deletions
|
|
@ -206,11 +206,11 @@ func (v *View) Relocate() bool {
|
|||
ret := false
|
||||
cy := v.Cursor.y
|
||||
if cy < v.Topline {
|
||||
v.Topline = cy
|
||||
v.Topline = cy - 4
|
||||
ret = true
|
||||
}
|
||||
if cy > v.Topline+v.height-1 {
|
||||
v.Topline = cy - v.height + 1
|
||||
v.Topline = cy - v.height + 5
|
||||
ret = true
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue