refactor: pass the window to get_(side)scrolloff_value

to less rely on curwin
This commit is contained in:
Matthieu Coudron
2020-12-23 16:21:10 +01:00
parent 5ce328df40
commit 4d9520ec86
7 changed files with 22 additions and 20 deletions

View File

@@ -594,7 +594,7 @@ static int insert_check(VimState *state)
if (curwin->w_wcol < s->mincol - curbuf->b_p_ts
&& curwin->w_wrow == curwin->w_winrow
+ curwin->w_height_inner - 1 - get_scrolloff_value()
+ curwin->w_height_inner - 1 - get_scrolloff_value(curwin)
&& (curwin->w_cursor.lnum != curwin->w_topline
|| curwin->w_topfill > 0)) {
if (curwin->w_topfill > 0) {