diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-04-21 21:10:14 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-04-21 21:10:14 +0200 |
commit | 8a633e3427b47286869aa4b96f2bfc1fe65b25cd (patch) | |
tree | eec90d2e5fdc9a9da532a024ca59993e000813f6 /src/option.c | |
parent | 6d4431e7b675ba7a0194c0b8eb84b7d92e4e7953 (diff) |
patch 7.4.1770v7.4.1770
Problem: Cannot use true color in the terminal.
Solution: Add the 'guicolors' option. (Nikolai Pavlov)
Diffstat (limited to 'src/option.c')
-rw-r--r-- | src/option.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/option.c b/src/option.c index a5b403cf9f..da02864123 100644 --- a/src/option.c +++ b/src/option.c @@ -1305,7 +1305,16 @@ static struct vimoption options[] = {(char_u *)NULL, (char_u *)0L} #endif SCRIPTID_INIT}, - {"guicursor", "gcr", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP, + {"guicolors", "gcol", P_BOOL|P_VI_DEF|P_VIM|P_RCLR, +#ifdef FEAT_TERMTRUECOLOR + (char_u *)&p_guicolors, PV_NONE, + {(char_u *)FALSE, (char_u *)FALSE} +#else + (char_u*)NULL, PV_NONE, + {(char_u *)FALSE, (char_u *)FALSE} +#endif + SCRIPTID_INIT}, + {"guicursor", "gcr", P_STRING|P_VI_DEF|P_ONECOMMA|P_NODUP, #ifdef CURSOR_SHAPE (char_u *)&p_guicursor, PV_NONE, { @@ -3011,6 +3020,8 @@ static struct vimoption options[] = p_term("t_xs", T_XS) p_term("t_ZH", T_CZH) p_term("t_ZR", T_CZR) + p_term("t_8f", T_8F) + p_term("t_8b", T_8B) /* terminal key codes are not in here */ @@ -8353,6 +8364,17 @@ set_bool_option( #endif +#ifdef FEAT_TERMTRUECOLOR + /* 'guicolors' */ + else if ((int *)varp == &p_guicolors) + { +# ifdef FEAT_GUI + if (!gui.in_use && !gui.starting) +# endif + highlight_gui_started(); + } +#endif + /* * End of handling side effects for bool options. */ |