diff options
Diffstat (limited to 'src/nvim/normal.c')
-rw-r--r-- | src/nvim/normal.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c index 9185062f94..1471c16a9f 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -1275,10 +1275,25 @@ static void normal_redraw(NormalState *s) redrawWinline(curwin, curwin->w_cursor.lnum); } + if (curwin->w_p_cul && curwin->w_p_wrap + && (curwin->w_p_culopt_flags & CULOPT_SCRLINE)) { + must_redraw = NOT_VALID; + } + if (VIsual_active) { update_curbuf(INVERTED); // update inverted part } else if (must_redraw) { - update_screen(0); + // Might need some more update for the cursorscreen line. + // TODO(vim): can we optimized this? + if (curwin->w_p_cul + && curwin->w_p_wrap + && (curwin->w_p_culopt_flags & CULOPT_SCRLINE) + && !char_avail()) { + update_screen(VALID); + } + else { + update_screen(0); + } } else if (redraw_cmdline || clear_cmdline) { showmode(); } |