Mercurial > vim
changeset 24647:3f6a0ff1c5d3 v8.2.2862
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 <Bram@vim.org>
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 17 May 2021 00:30:03 +0200 |
parents | e0fe4fd5cf3c |
children | 3105725aa7f2 |
files | src/textprop.c src/version.c |
diffstat | 2 files changed, 11 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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); + } + } } /*