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)
diff --git a/src/spell.c b/src/spell.c
index 0c18904..e5c2f7d 100644
--- a/src/spell.c
+++ b/src/spell.c
@@ -2913,6 +2913,9 @@
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)
{