summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2014-07-02 17:16:58 +0200
committerBram Moolenaar <Bram@vim.org>2014-07-02 17:16:58 +0200
commitdab70c63e16687b2cb784a3a9eecdbea6ecd7065 (patch)
treed2e22231a6cd47939427e20f9f914f5a6985d219
parente7eb789ef0d2dadf5824a0c6fbd452b1feb272e2 (diff)
downloadvim-git-dab70c63e16687b2cb784a3a9eecdbea6ecd7065.tar.gz
updated for version 7.4.349v7.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)
-rw-r--r--src/screen.c6
-rw-r--r--src/version.c2
-rw-r--r--src/window.c6
3 files changed, 10 insertions, 4 deletions
diff --git a/src/screen.c b/src/screen.c
index 8e616915b..65aadc423 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -1769,8 +1769,10 @@ win_update(wp)
syntax_check_changed(lnum)))
#endif
#ifdef FEAT_SEARCH_EXTRA
- /* match in fixed position might need redraw */
- || wp->w_match_head != NULL
+ /* match in fixed position might need redraw
+ * if lines were inserted or deleted */
+ || (wp->w_match_head != NULL
+ && buf->b_mod_xlines != 0)
#endif
)))))
{
diff --git a/src/version.c b/src/version.c
index 214f24a8b..e86b43ddf 100644
--- a/src/version.c
+++ b/src/version.c
@@ -735,6 +735,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 349,
+/**/
348,
/**/
347,
diff --git a/src/window.c b/src/window.c
index 96d4771fb..81064518c 100644
--- a/src/window.c
+++ b/src/window.c
@@ -6904,12 +6904,13 @@ match_add(wp, grp, pat, prio, id, pos_list)
}
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;
}
}
@@ -6986,10 +6987,11 @@ match_delete(wp, id, perr)
}
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;
}
vim_free(cur);