summaryrefslogtreecommitdiff
path: root/src/textprop.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-05-17 00:15:18 +0200
committerBram Moolenaar <Bram@vim.org>2021-05-17 00:15:18 +0200
commitfc643e6016af80ed5be4570db5c26a6410f52d16 (patch)
treec062344eff197944e919885e0d4393deedf14f26 /src/textprop.c
parent3b1373b193ce5fbf25e852277a4ecc98688c7bb8 (diff)
downloadvim-git-fc643e6016af80ed5be4570db5c26a6410f52d16.tar.gz
patch 8.2.2862: removing a text property causes the whole window to be redawnv8.2.2862
Problem: Removing a text property causes the whole window to be redawn. Solution: Use changed_lines_buf() to only redraw the affected lines.
Diffstat (limited to 'src/textprop.c')
-rw-r--r--src/textprop.c10
1 files changed, 9 insertions, 1 deletions
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);
+ }
+ }
}
/*