aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/edit.c
diff options
context:
space:
mode:
authorMatthieu Coudron <mcoudron@hotmail.com>2020-12-23 16:21:10 +0100
committerMatthieu Coudron <mcoudron@hotmail.com>2020-12-23 16:21:10 +0100
commit4d9520ec86aaea607f0dc7f1630a82a1cdf9515a (patch)
tree3be455ca36108ecf32f09063f7505b2c1192a3e8 /src/nvim/edit.c
parent5ce328df401bc5cafd66caeb265835b939028b7f (diff)
downloadrneovim-4d9520ec86aaea607f0dc7f1630a82a1cdf9515a.tar.gz
rneovim-4d9520ec86aaea607f0dc7f1630a82a1cdf9515a.tar.bz2
rneovim-4d9520ec86aaea607f0dc7f1630a82a1cdf9515a.zip
refactor: pass the window to get_(side)scrolloff_value
to less rely on curwin
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r--src/nvim/edit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c
index 1cf821f786..b0dffc3af2 100644
--- a/src/nvim/edit.c
+++ b/src/nvim/edit.c
@@ -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) {