mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 13:38:34 +00:00
vim-patch:7.4.1620
Problem: Emoji characters are not considered as a kind of word character.
Solution: Give emoji characters a word class number. (Yashuhiro Matsumoto)
4077b33a83
This commit is contained in:
@@ -949,7 +949,7 @@ int utf_char2cells(int c)
|
||||
if (intable(doublewidth, ARRAY_SIZE(doublewidth), c))
|
||||
return 2;
|
||||
#endif
|
||||
if (p_emoji && intable(emoji, ARRAY_SIZE(emoji), c)) {
|
||||
if (p_emoji && intable(emoji_tab, ARRAY_SIZE(emoji_tab), c)) {
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
@@ -1715,6 +1715,11 @@ int utf_class(int c)
|
||||
return (int)classes[mid].class;
|
||||
}
|
||||
|
||||
// emoji
|
||||
if (intable(emoji_tab, ARRAY_SIZE(emoji_tab), c)) {
|
||||
return 3;
|
||||
}
|
||||
|
||||
/* most other characters are "word" characters */
|
||||
return 2;
|
||||
}
|
||||
|
Reference in New Issue
Block a user