1
0
forked from aniani/vim

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>
This commit is contained in:
Luuk van Baal
2025-02-22 09:19:04 +01:00
committed by Christian Brabandt
parent bf595ae4ac
commit 7bbb0f357e
5 changed files with 23 additions and 39 deletions

View File

@@ -2384,12 +2384,7 @@ foldUpdateIEMS(win_T *wp, linenr_T top, linenr_T bot)
// 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;
}