1
0
forked from aniani/vim

patch 8.2.2569: 'fillchars' "stl" and "stlnc" items must be single byte

Problem:    'fillchars' "stl" and "stlnc" items must be single byte.
Solution:   Accept multi-byte characters. (Christian Wellenbrock, Yegappan
            Lakshmanan, closes #7927)
This commit is contained in:
Bram Moolenaar
2021-03-04 21:55:58 +01:00
parent 6057748a1a
commit 008bff967f
7 changed files with 101 additions and 24 deletions

View File

@@ -252,6 +252,7 @@
#define MB_CHARLEN(p) (has_mbyte ? mb_charlen(p) : (int)STRLEN(p))
#define MB_CHAR2LEN(c) (has_mbyte ? mb_char2len(c) : 1)
#define PTR2CHAR(p) (has_mbyte ? mb_ptr2char(p) : (int)*(p))
#define MB_CHAR2BYTES(c, b) do { if (has_mbyte) (b) += (*mb_char2bytes)((c), (b)); else *(b)++ = (c); } while(0)
#ifdef FEAT_AUTOCHDIR
# define DO_AUTOCHDIR do { if (p_acd) do_autochdir(); } while (0)