diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2020-12-24 22:43:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-24 22:43:27 +0100 |
commit | 8c8cc35926f265bf4f048b83fd130bef3932851e (patch) | |
tree | c9ef81f318eace216546c0a6eabd6df5c71847d4 /src/nvim/ex_docmd.c | |
parent | 88ae03bcdb8992fd91a3efdb61dbd7e2aa395eff (diff) | |
parent | 7add3ef996db3fd6ec8d03d2b8d879c58934b6e5 (diff) | |
download | rneovim-8c8cc35926f265bf4f048b83fd130bef3932851e.tar.gz rneovim-8c8cc35926f265bf4f048b83fd130bef3932851e.tar.bz2 rneovim-8c8cc35926f265bf4f048b83fd130bef3932851e.zip |
Merge pull request #13595 from teto/fix-filler
de curwinify some functions
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r-- | src/nvim/ex_docmd.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index a5eccc12b9..63e5c1c9ed 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -7362,7 +7362,7 @@ static void ex_syncbind(exarg_T *eap) topline = curwin->w_topline; FOR_ALL_WINDOWS_IN_TAB(wp, curtab) { if (wp->w_p_scb && wp->w_buffer) { - y = wp->w_buffer->b_ml.ml_line_count - get_scrolloff_value(); + y = wp->w_buffer->b_ml.ml_line_count - get_scrolloff_value(curwin); if (topline > y) { topline = y; } @@ -8050,7 +8050,7 @@ static void ex_redraw(exarg_T *eap) RedrawingDisabled = 0; p_lz = FALSE; validate_cursor(); - update_topline(); + update_topline(curwin); if (eap->forceit) { redraw_all_later(NOT_VALID); } @@ -8199,10 +8199,11 @@ static void ex_mark(exarg_T *eap) */ void update_topline_cursor(void) { - check_cursor(); /* put cursor on valid line */ - update_topline(); - if (!curwin->w_p_wrap) + check_cursor(); // put cursor on valid line + update_topline(curwin); + if (!curwin->w_p_wrap) { validate_cursor(); + } update_curswant(); } |