diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-03-21 14:39:19 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-03-21 14:39:19 +0100 |
commit | 196a1f740981e878091fa124a400d1fc4bfa2bb0 (patch) | |
tree | ce397a8e006aa7d4983ba7f868e5f6331403d5b8 /src/screen.c | |
parent | c5cf369e9543ff065e2e1da91da3218c223840e2 (diff) | |
download | vim-git-196a1f740981e878091fa124a400d1fc4bfa2bb0.tar.gz |
patch 8.2.2633: multi-byte 'fillchars' for folding do not show properlyv8.2.2633
Problem: Multi-byte 'fillchars' for folding do not show properly.
Solution: Handle multi-byte characters correctly. (Yegappan Lakshmanan,
closes #7983, closes #7955)
Diffstat (limited to 'src/screen.c')
-rw-r--r-- | src/screen.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/screen.c b/src/screen.c index 84951c5cc..d219b13c3 100644 --- a/src/screen.c +++ b/src/screen.c @@ -295,8 +295,13 @@ fill_foldcolumn( if (closed) { if (symbol != 0) - // rollback length + { + // rollback length and the character byte_counter -= len; + if (len > 1) + // for a multibyte character, erase all the bytes + vim_memset(p + byte_counter, ' ', len); + } symbol = fill_foldclosed; len = utf_char2bytes(symbol, &p[byte_counter]); byte_counter += len; |