changeset 10597:472bff31a20a v8.0.0188

patch 8.0.0188: redrawing for 'cursorbind' is inefficient commit https://github.com/vim/vim/commit/9506cad7a1a6e52a613f356de969cbd980815777 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jan 15 13:53:49 2017 +0100 patch 8.0.0188: redrawing for 'cursorbind' is inefficient Problem: Using NOT_VALID for redraw_later() to update the cursor line/column highlighting is not efficient. Solution: Call validate_cursor() when 'cul' or 'cuc' is set.
author Christian Brabandt <cb@256bit.org>
date Sun, 15 Jan 2017 14:00:03 +0100
parents b9ddd02d90be
children 2231f9670ea3
files src/move.c src/version.c
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/move.c
+++ b/src/move.c
@@ -2841,17 +2841,15 @@ do_check_cursorbind(void)
 	    restart_edit_save = restart_edit;
 	    restart_edit = TRUE;
 	    check_cursor();
-# ifdef FEAT_SYN_HL
-	    if (curwin->w_p_cuc)
+	    if (curwin->w_p_cul || curwin->w_p_cuc)
 		validate_cursor();
-# endif
 	    restart_edit = restart_edit_save;
 # ifdef FEAT_MBYTE
 	    /* Correct cursor for multi-byte character. */
 	    if (has_mbyte)
 		mb_adjust_cursor();
 # endif
-	    redraw_later(curwin->w_p_cul ? NOT_VALID : VALID);
+	    redraw_later(VALID);
 
 	    /* Only scroll when 'scrollbind' hasn't done this. */
 	    if (!curwin->w_p_scb)
--- a/src/version.c
+++ b/src/version.c
@@ -765,6 +765,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    188,
+/**/
     187,
 /**/
     186,