# HG changeset patch # User Bram Moolenaar # Date 1621204203 -7200 # Node ID 3f6a0ff1c5d3b87cc771d2f5e85111efd5856aa9 # Parent e0fe4fd5cf3c6dba23648c61410560edd6223f97 patch 8.2.2862: removing a text property causes the whole window to be redawn Commit: https://github.com/vim/vim/commit/fc643e6016af80ed5be4570db5c26a6410f52d16 Author: Bram Moolenaar Date: Mon May 17 00:15:18 2021 +0200 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 --- a/src/textprop.c +++ b/src/textprop.c @@ -933,7 +933,15 @@ f_prop_remove(typval_T *argvars, typval_ } } 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 --- a/src/version.c +++ b/src/version.c @@ -751,6 +751,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 2862, +/**/ 2861, /**/ 2860,