From: Bram Moolenaar Date: Sun, 16 May 2021 22:15:18 +0000 (+0200) Subject: patch 8.2.2862: removing a text property causes the whole window to be redawn X-Git-Tag: v8.2.2862 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fc643e6016af80ed5be4570db5c26a6410f52d16;p=vim 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 f11e1a394..9a9dddce7 100644 --- a/src/textprop.c +++ b/src/textprop.c @@ -933,7 +933,15 @@ f_prop_remove(typval_T *argvars, typval_T *rettv) } } 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); + } + } } /* diff --git a/src/version.c b/src/version.c index fca2cd8c4..b5401e624 100644 --- a/src/version.c +++ b/src/version.c @@ -750,6 +750,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 2862, /**/ 2861, /**/