# HG changeset patch # User Bram Moolenaar # Date 1566738004 -7200 # Node ID 06e655ce19385aa36ab5da70747ac6d9b9fda34b # Parent 09df8cc020e0c2940d33d89d05cbeb6d0ebcafed patch 8.1.1926: cursorline not redrawn when putting a line above the cursor Commit: https://github.com/vim/vim/commit/c2b97643a82bb9fbd202312dac4aa995f92e9e5b Author: Bram Moolenaar Date: Sun Aug 25 14:48:37 2019 +0200 patch 8.1.1926: cursorline not redrawn when putting a line above the cursor Problem: Cursorline not redrawn when putting a line above the cursor. Solution: Redraw when the curor line is below a change. (closes https://github.com/vim/vim/issues/4862) diff --git a/src/change.c b/src/change.c --- 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); } } diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -762,6 +762,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1926, +/**/ 1925, /**/ 1924,