diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-10-24 22:32:31 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-10-24 22:32:31 +0200 |
commit | 11a58af66fa5c442f0a22c5d59beabf187ed4e89 (patch) | |
tree | 19b2b26b7907004365c26f85a667655c45c17d3a /src/change.c | |
parent | aa1f04d09286085c4031bc7c4ca9fa672f6f4905 (diff) | |
download | vim-git-11a58af66fa5c442f0a22c5d59beabf187ed4e89.tar.gz |
patch 8.1.2214: too much is redrawn when 'cursorline' is setv8.1.2214
Problem: Too much is redrawn when 'cursorline' is set.
Solution: Don't do a complete redraw. (closes #5079)
Diffstat (limited to 'src/change.c')
-rw-r--r-- | src/change.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/change.c b/src/change.c index da6a72b56..f2542810e 100644 --- a/src/change.c +++ b/src/change.c @@ -609,16 +609,21 @@ changed_common( if (hasAnyFolding(wp)) set_topline(wp, wp->w_topline); #endif - // Relative numbering may require updating more. Cursor line - // highlighting probably needs to be updated if it's below the - // change (or is using screenline highlighting) - if (wp->w_p_rnu + // Relative numbering may require updating more. + if (wp->w_p_rnu) + redraw_win_later(wp, SOME_VALID); #ifdef FEAT_SYN_HL - || ((wp->w_p_cul && lnum <= wp->w_last_cursorline) - || (wp->w_p_culopt_flags & CULOPT_SCRLINE)) + // 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_win_later(wp, VALID); + else if (lnum <= wp->w_last_cursorline) + redraw_win_later(wp, SOME_VALID); + } #endif - ) - redraw_win_later(wp, SOME_VALID); } } |