diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-01-15 13:53:49 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-01-15 13:53:49 +0100 |
commit | 9506cad7a1a6e52a613f356de969cbd980815777 (patch) | |
tree | 3e2f05bf23cc16e46c68209ab505f6e07412729c /src/move.c | |
parent | fe6ce331d94c24ad745d0bf329ec0a65a5c07cc9 (diff) | |
download | vim-git-9506cad7a1a6e52a613f356de969cbd980815777.tar.gz |
patch 8.0.0188: redrawing for 'cursorbind' is inefficientv8.0.0188
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.
Diffstat (limited to 'src/move.c')
-rw-r--r-- | src/move.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/move.c b/src/move.c index 5968a8b08..e2639fd20 100644 --- 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) |