patch 7.4.1604
Problem: Although emoji characters are ambiguous width, best is to treat
them as full width.
Solution: Update the Unicode character tables. Add the 'emoji' options.
(Yasuhiro Matsumoto)
diff --git a/src/option.c b/src/option.c
index 648919d..fe2ae17 100644
--- a/src/option.c
+++ b/src/option.c
@@ -1051,6 +1051,15 @@
{"edcompatible","ed", P_BOOL|P_VI_DEF,
(char_u *)&p_ed, PV_NONE,
{(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
+ {"emoji", "emo", P_BOOL|P_VI_DEF|P_RCLR,
+#if defined(FEAT_MBYTE)
+ (char_u *)&p_emoji, PV_NONE,
+ {(char_u *)TRUE, (char_u *)0L}
+#else
+ (char_u *)NULL, PV_NONE,
+ {(char_u *)0L, (char_u *)0L}
+#endif
+ SCRIPTID_INIT},
{"encoding", "enc", P_STRING|P_VI_DEF|P_RCLR|P_NO_ML,
#ifdef FEAT_MBYTE
(char_u *)&p_enc, PV_NONE,
@@ -5986,7 +5995,7 @@
/* 'ambiwidth' */
#ifdef FEAT_MBYTE
- else if (varp == &p_ambw)
+ else if (varp == &p_ambw || varp == &p_emoji)
{
if (check_opt_strings(p_ambw, p_ambw_values, FALSE) != OK)
errmsg = e_invarg;