aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/mbyte.c
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2016-09-22 00:43:19 -0400
committerJames McCoy <jamessan@jamessan.com>2016-09-24 14:03:22 -0400
commit1144cc6d9edd8d59b6f24e4d8f1df395342c2619 (patch)
treed089014953f2fcc3f21cc79c5b149e167129b4b4 /src/nvim/mbyte.c
parent45598d2e5e2b56e24e4d5abe4f28f259e3def572 (diff)
downloadrneovim-1144cc6d9edd8d59b6f24e4d8f1df395342c2619.tar.gz
rneovim-1144cc6d9edd8d59b6f24e4d8f1df395342c2619.tar.bz2
rneovim-1144cc6d9edd8d59b6f24e4d8f1df395342c2619.zip
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) https://github.com/vim/vim/commit/b86f10ee10bdf932df02bdaf601dffa671518a47
Diffstat (limited to 'src/nvim/mbyte.c')
-rw-r--r--src/nvim/mbyte.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/mbyte.c b/src/nvim/mbyte.c
index e4ed46208b..2978171051 100644
--- a/src/nvim/mbyte.c
+++ b/src/nvim/mbyte.c
@@ -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;
}