diff options
Diffstat (limited to 'src/nvim/change.c')
-rw-r--r-- | src/nvim/change.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/nvim/change.c b/src/nvim/change.c index 04552f6703..49e403425a 100644 --- a/src/nvim/change.c +++ b/src/nvim/change.c @@ -290,13 +290,21 @@ static void changed_common(linenr_T lnum, colnr_T col, linenr_T lnume, set_topline(wp, wp->w_topline); } - // Relative numbering may require updating more. Cursor line - // highlighting probably needs to be updated if it's below the - // change. - if (wp->w_p_rnu - || (wp->w_p_cul && lnum <= wp->w_last_cursorline)) { + // Relative numbering may require updating more. + if (wp->w_p_rnu) { redraw_later(wp, SOME_VALID); } + + // Cursor line highlighting probably need to be updated with + // "VALID" if it's below the change. + // If the cursor line is inside the change we need to redraw more. + if (wp->w_p_cul) { + if (xtra == 0) { + redraw_later(wp, VALID); + } else if (lnum <= wp->w_last_cursorline) { + redraw_later(wp, SOME_VALID); + } + } } } |