mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 13:38:34 +00:00
vim-patch:7.4.1629
Problem: Handling emoji characters as full width has problems with
backwards compatibility.
Solution: Remove ambiguous and double width characters from the emoji table.
Use a separate table for the character class.
(partly by Yashuhiro Matsumoto)
b86f10ee10
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_tab, ARRAY_SIZE(emoji_tab), c)) {
|
||||
if (p_emoji && intable(emoji_width, ARRAY_SIZE(emoji_width), c)) {
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
@@ -1716,7 +1716,7 @@ int utf_class(int c)
|
||||
}
|
||||
|
||||
// emoji
|
||||
if (intable(emoji_tab, ARRAY_SIZE(emoji_tab), c)) {
|
||||
if (intable(emoji_all, ARRAY_SIZE(emoji_all), c)) {
|
||||
return 3;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user