forked from aniani/vim
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)
This commit is contained in:
11
src/option.c
11
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;
|
||||
|
Reference in New Issue
Block a user