patch 8.2.2862: removing a text property causes the whole window to be redawn
Problem: Removing a text property causes the whole window to be redawn.
Solution: Use changed_lines_buf() to only redraw the affected lines.
diff --git a/src/textprop.c b/src/textprop.c
index f11e1a3..9a9dddc 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -933,7 +933,15 @@
}
}
if (rettv->vval.v_number > 0)
- redraw_buf_later(buf, NOT_VALID);
+ {
+ if (start == 1 && end == buf->b_ml.ml_line_count)
+ redraw_buf_later(buf, NOT_VALID);
+ else
+ {
+ changed_lines_buf(buf, start, end + 1, 0);
+ redraw_buf_later(buf, VALID);
+ }
+ }
}
/*