]> granicus.if.org Git - vim/commitdiff
patch 8.0.0188: redrawing for 'cursorbind' is inefficient v8.0.0188
authorBram Moolenaar <Bram@vim.org>
Sun, 15 Jan 2017 12:53:49 +0000 (13:53 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 15 Jan 2017 12:53:49 +0000 (13:53 +0100)
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.

src/move.c
src/version.c

index 5968a8b08817a4ec9b4843fdca7908baf2e280ba..e2639fd2035663b20a6f188260a8f973e670ba06 100644 (file)
@@ -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)
index 814934ded89ee9b864475a0300494dc2d8b7ba1b..8cb6cb8a2b9cc8c7ed8057b276763af5126511c6 100644 (file)
@@ -764,6 +764,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    188,
 /**/
     187,
 /**/