diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-03-19 18:42:29 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-03-19 18:42:29 +0100 |
commit | 3848e00e0177abdb31bc600234967863ec487233 (patch) | |
tree | 24e98aae0cf331b430e63f4dfb712dc161d2190d /src/option.c | |
parent | bfb96c047b79b2aab5fd57a2472871508819f3ef (diff) | |
download | vim-git-3848e00e0177abdb31bc600234967863ec487233.tar.gz |
patch 7.4.1604v7.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)
Diffstat (limited to 'src/option.c')
-rw-r--r-- | src/option.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/option.c b/src/option.c index 648919dc7..fe2ae179a 100644 --- a/src/option.c +++ b/src/option.c @@ -1051,6 +1051,15 @@ static struct vimoption options[] = {"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 @@ did_set_string_option( /* '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; |