patch 9.1.1136: Match highlighting marks a buffer region as changed
Problem: Match highlighting marks a buffer region to be redrawn as if
its buffer text was changed, unnecessarily invoking syntax code.
Solution: Set the `w_redraw_top/bot` variables instead of the b_mod_* ones
(Luuk van Baal)
closes: #16697
Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/fold.c b/src/fold.c
index 64f9447..b165dc9 100644
--- a/src/fold.c
+++ b/src/fold.c
@@ -2384,12 +2384,7 @@
// this in other situations, the changed lines will be redrawn anyway and
// this method can cause the whole window to be updated.
if (end != bot)
- {
- if (wp->w_redraw_top == 0 || wp->w_redraw_top > top)
- wp->w_redraw_top = top;
- if (wp->w_redraw_bot < end)
- wp->w_redraw_bot = end;
- }
+ redraw_win_range_later(wp, top, end);
invalid_top = (linenr_T)0;
}