mirror of
https://github.com/neovim/neovim.git
synced 2025-10-09 19:36:40 +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;
|
||||
}
|
||||
|
||||
|
@@ -814,7 +814,7 @@ static int included_patches[] = {
|
||||
// 1632 NA
|
||||
// 1631 NA
|
||||
// 1630,
|
||||
// 1629,
|
||||
1629,
|
||||
// 1628 NA
|
||||
// 1627 NA
|
||||
// 1626 NA
|
||||
|
Reference in New Issue
Block a user