0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

updated for version 7.4.349

Problem:    When there are matches to highlight the whole window is redrawn,
            which is slow.
Solution:   Only redraw everything when lines were inserted or deleted.
            Reset b_mod_xlines when needed.  (Alexey Radkov)
This commit is contained in:
Bram Moolenaar
2014-07-02 17:16:58 +02:00
parent e7eb789ef0
commit dab70c63e1
3 changed files with 10 additions and 4 deletions

View File

@@ -1769,8 +1769,10 @@ win_update(wp)
syntax_check_changed(lnum))) syntax_check_changed(lnum)))
#endif #endif
#ifdef FEAT_SEARCH_EXTRA #ifdef FEAT_SEARCH_EXTRA
/* match in fixed position might need redraw */ /* match in fixed position might need redraw
|| wp->w_match_head != NULL * if lines were inserted or deleted */
|| (wp->w_match_head != NULL
&& buf->b_mod_xlines != 0)
#endif #endif
))))) )))))
{ {

View File

@@ -734,6 +734,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 */
/**/
349,
/**/ /**/
348, 348,
/**/ /**/

View File

@@ -6904,12 +6904,13 @@ match_add(wp, grp, pat, prio, id, pos_list)
} }
else else
{ {
wp->w_buffer->b_mod_set = TRUE;
wp->w_buffer->b_mod_top = toplnum; wp->w_buffer->b_mod_top = toplnum;
wp->w_buffer->b_mod_bot = botlnum; wp->w_buffer->b_mod_bot = botlnum;
wp->w_buffer->b_mod_xlines = 0;
} }
m->pos.toplnum = toplnum; m->pos.toplnum = toplnum;
m->pos.botlnum = botlnum; m->pos.botlnum = botlnum;
wp->w_buffer->b_mod_set = TRUE;
rtype = VALID; rtype = VALID;
} }
} }
@@ -6986,10 +6987,11 @@ match_delete(wp, id, perr)
} }
else else
{ {
wp->w_buffer->b_mod_set = TRUE;
wp->w_buffer->b_mod_top = cur->pos.toplnum; wp->w_buffer->b_mod_top = cur->pos.toplnum;
wp->w_buffer->b_mod_bot = cur->pos.botlnum; wp->w_buffer->b_mod_bot = cur->pos.botlnum;
wp->w_buffer->b_mod_xlines = 0;
} }
wp->w_buffer->b_mod_set = TRUE;
rtype = VALID; rtype = VALID;
} }
vim_free(cur); vim_free(cur);