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:
James McCoy
2016-09-22 00:43:19 -04:00
parent 45598d2e5e
commit 1144cc6d9e
3 changed files with 62 additions and 15 deletions

View File

@@ -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;
}