diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-03-04 21:55:58 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-03-04 21:55:58 +0100 |
commit | 008bff967f7fcaa6af066f71d65bfbba5ef5c7d3 (patch) | |
tree | 7ea14f1f725326415879039cf4ed6e96e7d81458 /src/macros.h | |
parent | 6057748a1af2260b4ab9630f21fe71f42f91250d (diff) | |
download | vim-git-008bff967f7fcaa6af066f71d65bfbba5ef5c7d3.tar.gz |
patch 8.2.2569: 'fillchars' "stl" and "stlnc" items must be single bytev8.2.2569
Problem: 'fillchars' "stl" and "stlnc" items must be single byte.
Solution: Accept multi-byte characters. (Christian Wellenbrock, Yegappan
Lakshmanan, closes #7927)
Diffstat (limited to 'src/macros.h')
-rw-r--r-- | src/macros.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/macros.h b/src/macros.h index 5a57a8928..c11ee660c 100644 --- a/src/macros.h +++ b/src/macros.h @@ -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) |