vim-patch: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)

https://code.google.com/p/vim/source/detail?r=v7-4-349
This commit is contained in:
André Twupack
2014-09-11 20:43:47 +02:00
parent ba4acce341
commit 12ca4f582e
3 changed files with 8 additions and 5 deletions

View File

@@ -5323,12 +5323,13 @@ int match_add(win_T *wp, char_u *grp, char_u *pat, int prio, int id, list_T *pos
wp->w_buffer->b_mod_bot = botlnum;
}
} else {
wp->w_buffer->b_mod_set = TRUE;
wp->w_buffer->b_mod_top = toplnum;
wp->w_buffer->b_mod_bot = botlnum;
wp->w_buffer->b_mod_xlines = 0;
}
m->pos.toplnum = toplnum;
m->pos.botlnum = botlnum;
wp->w_buffer->b_mod_set = TRUE;
rtype = VALID;
}
}
@@ -5396,10 +5397,11 @@ int match_delete(win_T *wp, int id, int perr)
wp->w_buffer->b_mod_bot = cur->pos.botlnum;
}
} else {
wp->w_buffer->b_mod_set = TRUE;
wp->w_buffer->b_mod_top = cur->pos.toplnum;
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;
}
free(cur);