diff options
author | André Twupack <atwupack@mailbox.org> | 2014-09-11 20:43:47 +0200 |
---|---|---|
committer | André Twupack <atwupack@mailbox.org> | 2014-09-11 20:46:10 +0200 |
commit | 12ca4f582e317f805a8dedbb6106ecb9d33b1f70 (patch) | |
tree | 755c8ee3ddc4e9b3dd74f4481162f2e62eea7542 /src/nvim/window.c | |
parent | ba4acce341d7c289ca84a7e5422c4a4d5fca2ed2 (diff) | |
download | rneovim-12ca4f582e317f805a8dedbb6106ecb9d33b1f70.tar.gz rneovim-12ca4f582e317f805a8dedbb6106ecb9d33b1f70.tar.bz2 rneovim-12ca4f582e317f805a8dedbb6106ecb9d33b1f70.zip |
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
Diffstat (limited to 'src/nvim/window.c')
-rw-r--r-- | src/nvim/window.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c index 0693e50bda..b9714ce690 100644 --- a/src/nvim/window.c +++ b/src/nvim/window.c @@ -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); |