Skip to content

Commit

Permalink
patch 8.2.2862: removing a text property causes the whole window to b…
Browse files Browse the repository at this point in the history
…e redawn

Problem:    Removing a text property causes the whole window to be redawn.
Solution:   Use changed_lines_buf() to only redraw the affected lines.
  • Loading branch information
brammool committed May 16, 2021
1 parent 3b1373b commit fc643e6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/textprop.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}

/*
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
2862,
/**/
2861,
/**/
Expand Down

0 comments on commit fc643e6

Please sign in to comment.