0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

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.
This commit is contained in:
Bram Moolenaar 2021-05-17 00:15:18 +02:00
parent 3b1373b193
commit fc643e6016
2 changed files with 11 additions and 1 deletions

View File

@ -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);
}
}
}
/*

View File

@ -750,6 +750,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
2862,
/**/
2861,
/**/