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)
diff --git a/src/window.c b/src/window.c
index 96d4771..8106451 100644
--- a/src/window.c
+++ b/src/window.c
@@ -6904,12 +6904,13 @@
}
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 @@
}
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);