diff options
author | LemonBoy <thatlemon@gmail.com> | 2022-05-21 11:20:42 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-05-21 11:20:42 +0100 |
commit | 0d534d9cf2ae95fc85ef7fe048d9ff590586a6a6 (patch) | |
tree | 86874373cae236c7ed6a795a45234c66321fcdba /src/change.c | |
parent | 3fcccf94e8bc142d2c79c3b62087145896df6b36 (diff) | |
download | vim-git-0d534d9cf2ae95fc85ef7fe048d9ff590586a6a6.tar.gz |
patch 8.2.4988: textprop in wrong position when replacing multi-byte charsv8.2.4988
Problem: Textprop in wrong position when replacing multi-byte chars.
Solution: Adjust textprop position. (closes #10461)
Diffstat (limited to 'src/change.c')
-rw-r--r-- | src/change.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/change.c b/src/change.c index 47411ca59..2d01f9258 100644 --- a/src/change.c +++ b/src/change.c @@ -1118,7 +1118,12 @@ ins_char_bytes(char_u *buf, int charlen) ml_replace(lnum, newp, FALSE); // mark the buffer as changed and prepare for displaying - inserted_bytes(lnum, col, newlen - oldlen); + changed_bytes(lnum, col); +#ifdef FEAT_PROP_POPUP + if (curbuf->b_has_textprop && newlen != oldlen) + adjust_prop_columns(lnum, col, newlen - oldlen, + State & REPLACE_FLAG ? APC_SUBSTITUTE : 0); +#endif // If we're in Insert or Replace mode and 'showmatch' is set, then briefly // show the match for right parens and braces. |