mirror of
https://github.com/neovim/neovim.git
synced 2025-10-16 23:06:14 +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:
@@ -1260,7 +1260,7 @@ int do_search(oparg_T *oap, int dirc, int search_delim, char *pat, size_t patlen
|
||||
// empty for the search_stat feature.
|
||||
if (!cmd_silent) {
|
||||
msgbuf[0] = (char)dirc;
|
||||
if (utf_iscomposing(utf_ptr2char(p))) {
|
||||
if (utf_iscomposing_first(utf_ptr2char(p))) {
|
||||
// Use a space to draw the composing char on.
|
||||
msgbuf[1] = ' ';
|
||||
memmove(msgbuf + 2, p, plen);
|
||||
|
Reference in New Issue
Block a user