0
0
mirror of https://github.com/vim/vim.git synced 2025-10-14 07:04:10 -04:00

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.
This commit is contained in:
Bram Moolenaar
2017-01-15 13:53:49 +01:00
parent fe6ce331d9
commit 9506cad7a1
2 changed files with 4 additions and 4 deletions

View File

@@ -2841,17 +2841,15 @@ do_check_cursorbind(void)
restart_edit_save = restart_edit; restart_edit_save = restart_edit;
restart_edit = TRUE; restart_edit = TRUE;
check_cursor(); check_cursor();
# ifdef FEAT_SYN_HL if (curwin->w_p_cul || curwin->w_p_cuc)
if (curwin->w_p_cuc)
validate_cursor(); validate_cursor();
# endif
restart_edit = restart_edit_save; restart_edit = restart_edit_save;
# ifdef FEAT_MBYTE # ifdef FEAT_MBYTE
/* Correct cursor for multi-byte character. */ /* Correct cursor for multi-byte character. */
if (has_mbyte) if (has_mbyte)
mb_adjust_cursor(); mb_adjust_cursor();
# endif # endif
redraw_later(curwin->w_p_cul ? NOT_VALID : VALID); redraw_later(VALID);
/* Only scroll when 'scrollbind' hasn't done this. */ /* Only scroll when 'scrollbind' hasn't done this. */
if (!curwin->w_p_scb) if (!curwin->w_p_scb)

View File

@@ -764,6 +764,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
188,
/**/ /**/
187, 187,
/**/ /**/