fix jiggle when scrolloff is maxed

This commit is contained in:
Gokcehan committed 2016-09-02 22:47:11 +03:00
1 parent 826787450a
commit 188bd97b3b
2 files changed
+6 -2

No files matched your search

+1 -2
View File
@@ -39,9 +39,8 @@ func (e *SetExpr) eval(app *App, args []string) {
log.Print(msg)
return
}
max := app.ui.wins[0].h/2 - 1
max := app.ui.wins[0].h/2
if n > max {
// TODO: stay at the same row while up/down in the middle
n = max
}
gOpts.scrolloff = n