forked from aniani/vim
patch 7.4.1770
Problem: Cannot use true color in the terminal. Solution: Add the 'guicolors' option. (Nikolai Pavlov)
This commit is contained in:
24
src/option.c
24
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.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user