diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-08-25 14:48:37 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-08-25 14:48:37 +0200 |
commit | c2b97643a82bb9fbd202312dac4aa995f92e9e5b (patch) | |
tree | 1b10f0110238b77ab49f4524d9a2ce4139375415 /src/change.c | |
parent | 4c313b13fb7bfa694ec6d2a13175e8650c007b2a (diff) |
patch 8.1.1926: cursorline not redrawn when putting a line above the cursorv8.1.1926
Problem: Cursorline not redrawn when putting a line above the cursor.
Solution: Redraw when the curor line is below a change. (closes #4862)
Diffstat (limited to 'src/change.c')
-rw-r--r-- | src/change.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/change.c b/src/change.c index ac2cc30be0..13218999b3 100644 --- a/src/change.c +++ b/src/change.c @@ -541,7 +541,6 @@ changed_common( changed_line_abv_curs_win(wp); } #endif - if (wp->w_cursor.lnum > lnum) changed_line_abv_curs_win(wp); else if (wp->w_cursor.lnum == lnum && wp->w_cursor.col >= col) @@ -592,8 +591,14 @@ changed_common( if (hasAnyFolding(wp)) set_topline(wp, wp->w_topline); #endif - // relative numbering may require updating more - if (wp->w_p_rnu) + // 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 +#ifdef FEAT_SYN_HL + || (wp->w_p_cul && lnum <= wp->w_last_cursorline) +#endif + ) redraw_win_later(wp, SOME_VALID); } } |