mirror of
https://github.com/neovim/neovim.git
synced 2024-12-23 20:55:18 -07:00
fix(extmark_to_array): convert conceal_char to bytes
conceal_char is the codepoint of the character. Using it directly as the string isn't valid if the character is non-ascii or on big-endian systems.
This commit is contained in:
parent
ad8bd45207
commit
13f8bc4257
@ -222,7 +222,9 @@ static Array extmark_to_array(const ExtmarkInfo *extmark, bool id, bool add_dict
|
||||
}
|
||||
|
||||
if (decor->conceal) {
|
||||
String name = cstr_to_string((char *)&decor->conceal_char);
|
||||
char bytes[MB_MAXCHAR + 1] = {0};
|
||||
utf_char2bytes(decor->conceal_char, bytes);
|
||||
String name = cstr_to_string(bytes);
|
||||
PUT(dict, "conceal", STRING_OBJ(name));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user