0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

patch 8.2.2633: multi-byte 'fillchars' for folding do not show properly

Problem:    Multi-byte 'fillchars' for folding do not show properly.
Solution:   Handle multi-byte characters correctly. (Yegappan Lakshmanan,
            closes #7983, closes #7955)
This commit is contained in:
Bram Moolenaar
2021-03-21 14:39:19 +01:00
parent c5cf369e95
commit 196a1f7409
3 changed files with 14 additions and 1 deletions

View File

@@ -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;