mirror of
https://github.com/neovim/neovim.git
synced 2025-09-10 13:28:19 +00:00
feat(mbyte): support extended grapheme clusters including more emoji
Use the grapheme break algorithm from utf8proc to support grapheme clusters from recent unicode versions. Handle variant selector VS16 turning some codepoints into double-width emoji. This means we need to use ptr2cells rather than char2cells when possible.
This commit is contained in:
@@ -571,7 +571,7 @@ Integer nvim_buf_set_extmark(Buffer buffer, Integer ns_id, Integer line, Integer
|
||||
String c = opts->conceal;
|
||||
if (c.size > 0) {
|
||||
int ch;
|
||||
hl.conceal_char = utfc_ptr2schar_len(c.data, (int)c.size, &ch);
|
||||
hl.conceal_char = utfc_ptr2schar(c.data, &ch);
|
||||
if (!hl.conceal_char || !vim_isprintc(ch)) {
|
||||
api_set_error(err, kErrorTypeValidation, "conceal char has to be printable");
|
||||
goto error;
|
||||
|
Reference in New Issue
Block a user