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;
set fillchars+=foldopen:▾,foldsep:│,foldclose:▸
call s:mbyte_fillchar_tests('▾', '▸', '│')
+ " Use a mix of multi-byte and single-byte characters
+ set fillchars+=foldopen:¬,foldsep:\|,foldclose:+
+ call s:mbyte_fillchar_tests('¬', '+', '|')
+ set fillchars+=foldopen:+,foldsep:\|,foldclose:¬
+ call s:mbyte_fillchar_tests('+', '¬', '|')
+
bw!
set foldenable& fdc& fdm& fillchars&
endfunc