patch 8.2.4947: text properties not adjusted when accepting spell suggestion

Problem:    Text properties not adjusted when accepting spell suggestion.
Solution:   Adjust text properties when text changes. (closes #10414)
This commit is contained in:
LemonBoy
2022-05-13 12:41:50 +01:00
committed by Bram Moolenaar
parent 7f8a3b11bf
commit b7a7012555
4 changed files with 55 additions and 0 deletions

View File

@ -2913,6 +2913,9 @@ ex_spellrepall(exarg_T *eap UNUSED)
STRCAT(p, line + curwin->w_cursor.col + STRLEN(repl_from));
ml_replace(curwin->w_cursor.lnum, p, FALSE);
changed_bytes(curwin->w_cursor.lnum, curwin->w_cursor.col);
if (curbuf->b_has_textprop && addlen != 0)
adjust_prop_columns(curwin->w_cursor.lnum,
curwin->w_cursor.col, addlen, APC_SUBSTITUTE);
if (curwin->w_cursor.lnum != prev_lnum)
{