summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-04-29 22:59:22 +0200
committerBram Moolenaar <Bram@vim.org>2016-04-29 22:59:22 +0200
commit61be73bb0f965a895bfb064ea3e55476ac175162 (patch)
tree1e8383f05effc05a320c2e803ff6f2b431c2507c /src
parentbb82762907ba024717ad9af3b229c2fa6405cd36 (diff)
patch 7.4.1799v7.4.1799
Problem: 'guicolors' is a confusing option name. Solution: Use 'termguicolors' instead. (Hirohito Higashi)
Diffstat (limited to 'src')
-rw-r--r--src/eval.c8
-rw-r--r--src/feature.h4
-rw-r--r--src/globals.h2
-rw-r--r--src/hardcopy.c2
-rw-r--r--src/option.c24
-rw-r--r--src/option.h6
-rw-r--r--src/proto/term.pro6
-rw-r--r--src/screen.c32
-rw-r--r--src/structs.h4
-rw-r--r--src/syntax.c66
-rw-r--r--src/term.c20
-rw-r--r--src/version.c12
-rw-r--r--src/vim.h16
13 files changed, 102 insertions, 100 deletions
diff --git a/src/eval.c b/src/eval.c
index 7abb62be82..b3a3b415a5 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -14042,15 +14042,15 @@ f_has(typval_T *argvars, typval_T *rettv)
"tcl",
# endif
#endif
+#ifdef FEAT_TERMGUICOLORS
+ "termguicolors",
+#endif
#ifdef TERMINFO
"terminfo",
#endif
#ifdef FEAT_TERMRESPONSE
"termresponse",
#endif
-#ifdef FEAT_TERMTRUECOLOR
- "termtruecolor",
-#endif
#ifdef FEAT_TEXTOBJ
"textobjects",
#endif
@@ -20019,7 +20019,7 @@ f_synIDattr(typval_T *argvars UNUSED, typval_T *rettv)
}
else
{
-#if defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR)
+#if defined(FEAT_GUI) || defined(FEAT_TERMGUICOLORS)
if (USE_24BIT)
modec = 'g';
else
diff --git a/src/feature.h b/src/feature.h
index d3d768eb37..54f665f40a 100644
--- a/src/feature.h
+++ b/src/feature.h
@@ -815,10 +815,10 @@
#endif
/*
- * +termtruecolor 'guicolor' option.
+ * +termguicolors 'termguicolors' option.
*/
#if (defined(FEAT_BIG) && defined(FEAT_SYN_HL)) && !defined(ALWAYS_USE_GUI)
-# define FEAT_TERMTRUECOLOR
+# define FEAT_TERMGUICOLORS
#endif
/* Mac specific thing: Codewarrior interface. */
diff --git a/src/globals.h b/src/globals.h
index 8cc9bedf9b..5010cd4aee 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -369,7 +369,7 @@ EXTERN char_u *use_gvimrc INIT(= NULL); /* "-U" cmdline argument */
EXTERN int cterm_normal_fg_color INIT(= 0);
EXTERN int cterm_normal_fg_bold INIT(= 0);
EXTERN int cterm_normal_bg_color INIT(= 0);
-#ifdef FEAT_TERMTRUECOLOR
+#ifdef FEAT_TERMGUICOLORS
EXTERN long_u cterm_normal_fg_gui_color INIT(= INVALCOLOR);
EXTERN long_u cterm_normal_bg_gui_color INIT(= INVALCOLOR);
#endif
diff --git a/src/hardcopy.c b/src/hardcopy.c
index aaa20102c8..55b3b15241 100644
--- a/src/hardcopy.c
+++ b/src/hardcopy.c
@@ -307,7 +307,7 @@ prt_get_attr(
pattr->underline = (highlight_has_attr(hl_id, HL_UNDERLINE, modec) != NULL);
pattr->undercurl = (highlight_has_attr(hl_id, HL_UNDERCURL, modec) != NULL);
-# if defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR)
+# if defined(FEAT_GUI) || defined(FEAT_TERMGUICOLORS)
if (USE_24BIT)
{
bg_color = highlight_gui_color_rgb(hl_id, FALSE);
diff --git a/src/option.c b/src/option.c
index da02864123..d048cecd30 100644
--- a/src/option.c
+++ b/src/option.c
@@ -1305,15 +1305,6 @@ static struct vimoption options[] =
{(char_u *)NULL, (char_u *)0L}
#endif
SCRIPTID_INIT},
- {"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,
@@ -2625,6 +2616,15 @@ static struct vimoption options[] =
{(char_u *)0L, (char_u *)0L}
#endif
SCRIPTID_INIT},
+ {"termguicolors", "tgc", P_BOOL|P_VI_DEF|P_VIM|P_RCLR,
+#ifdef FEAT_TERMGUICOLORS
+ (char_u *)&p_tgc, PV_NONE,
+ {(char_u *)FALSE, (char_u *)FALSE}
+#else
+ (char_u*)NULL, PV_NONE,
+ {(char_u *)FALSE, (char_u *)FALSE}
+#endif
+ SCRIPTID_INIT},
{"terse", NULL, P_BOOL|P_VI_DEF,
(char_u *)&p_terse, PV_NONE,
{(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT},
@@ -8364,9 +8364,9 @@ set_bool_option(
#endif
-#ifdef FEAT_TERMTRUECOLOR
- /* 'guicolors' */
- else if ((int *)varp == &p_guicolors)
+#ifdef FEAT_TERMGUICOLORS
+ /* 'termguicolors' */
+ else if ((int *)varp == &p_tgc)
{
# ifdef FEAT_GUI
if (!gui.in_use && !gui.starting)
diff --git a/src/option.h b/src/option.h
index 60889ab432..6fba8b8318 100644
--- a/src/option.h
+++ b/src/option.h
@@ -527,9 +527,6 @@ EXTERN char_u *p_popt; /* 'printoptions' */
EXTERN char_u *p_header; /* 'printheader' */
#endif
EXTERN int p_prompt; /* 'prompt' */
-#ifdef FEAT_TERMTRUECOLOR
-EXTERN int p_guicolors; /* 'guicolors' */
-#endif
#ifdef FEAT_GUI
EXTERN char_u *p_guifont; /* 'guifont' */
# ifdef FEAT_XFONTSET
@@ -843,6 +840,9 @@ EXTERN int p_tbidi; /* 'termbidi' */
#ifdef FEAT_MBYTE
EXTERN char_u *p_tenc; /* 'termencoding' */
#endif
+#ifdef FEAT_TERMGUICOLORS
+EXTERN int p_tgc; /* 'termguicolors' */
+#endif
EXTERN int p_terse; /* 'terse' */
EXTERN int p_ta; /* 'textauto' */
EXTERN int p_to; /* 'tildeop' */
diff --git a/src/proto/term.pro b/src/proto/term.pro
index 3984515446..93c6cb09bc 100644
--- a/src/proto/term.pro
+++ b/src/proto/term.pro
@@ -1,7 +1,7 @@
/* term.c */
-guicolor_T termtrue_mch_get_color(char_u *name);
-guicolor_T termtrue_get_color(char_u *name);
-long_u termtrue_mch_get_rgb(guicolor_T color);
+guicolor_T termgui_mch_get_color(char_u *name);
+guicolor_T termgui_get_color(char_u *name);
+long_u termgui_mch_get_rgb(guicolor_T color);
int set_termname(char_u *term);
void set_mouse_termcode(int n, char_u *s);
void del_mouse_termcode(int n);
diff --git a/src/screen.c b/src/screen.c
index ee348e9b53..a72bffa536 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -7840,12 +7840,12 @@ screen_start_highlight(int attr)
if ((attr & HL_BOLD) && T_MD != NULL) /* bold */
out_str(T_MD);
else if (aep != NULL && cterm_normal_fg_bold &&
-#ifdef FEAT_TERMTRUECOLOR
- (p_guicolors ?
+#ifdef FEAT_TERMGUICOLORS
+ (p_tgc ?
(aep->ae_u.cterm.fg_rgb != (long_u)INVALCOLOR):
#endif
(t_colors > 1 && aep->ae_u.cterm.fg_color)
-#ifdef FEAT_TERMTRUECOLOR
+#ifdef FEAT_TERMGUICOLORS
)
#endif
)
@@ -7868,8 +7868,8 @@ screen_start_highlight(int attr)
*/
if (aep != NULL)
{
-#ifdef FEAT_TERMTRUECOLOR
- if (p_guicolors)
+#ifdef FEAT_TERMGUICOLORS
+ if (p_tgc)
{
if (aep->ae_u.cterm.fg_rgb != (long_u)INVALCOLOR)
term_fg_rgb_color(aep->ae_u.cterm.fg_rgb);
@@ -7931,13 +7931,13 @@ screen_stop_highlight(void)
*/
aep = syn_cterm_attr2entry(screen_attr);
if (aep != NULL &&
-#ifdef FEAT_TERMTRUECOLOR
- (p_guicolors ?
+#ifdef FEAT_TERMGUICOLORS
+ (p_tgc ?
(aep->ae_u.cterm.fg_rgb != (long_u)INVALCOLOR ||
aep->ae_u.cterm.bg_rgb != (long_u)INVALCOLOR):
#endif
(aep->ae_u.cterm.fg_color || aep->ae_u.cterm.bg_color)
-#ifdef FEAT_TERMTRUECOLOR
+#ifdef FEAT_TERMGUICOLORS
)
#endif
)
@@ -7988,8 +7988,8 @@ screen_stop_highlight(void)
if (do_ME || (screen_attr & (HL_BOLD | HL_INVERSE)))
out_str(T_ME);
-#ifdef FEAT_TERMTRUECOLOR
- if (p_guicolors)
+#ifdef FEAT_TERMGUICOLORS
+ if (p_tgc)
{
if (cterm_normal_fg_gui_color != (long_u)INVALCOLOR)
term_fg_rgb_color(cterm_normal_fg_gui_color);
@@ -8025,8 +8025,8 @@ reset_cterm_colors(void)
if (IS_CTERM)
{
/* set Normal cterm colors */
-#ifdef FEAT_TERMTRUECOLOR
- if (p_guicolors ?
+#ifdef FEAT_TERMGUICOLORS
+ if (p_tgc ?
(cterm_normal_fg_gui_color != (long_u)INVALCOLOR
|| cterm_normal_bg_gui_color != (long_u)INVALCOLOR):
(cterm_normal_fg_color > 0 || cterm_normal_bg_color > 0))
@@ -8959,8 +8959,8 @@ can_clear(char_u *p)
#ifdef FEAT_GUI
|| gui.in_use
#endif
-#ifdef FEAT_TERMTRUECOLOR
- || (p_guicolors && cterm_normal_bg_gui_color != (long_u)INVALCOLOR)
+#ifdef FEAT_TERMGUICOLORS
+ || (p_tgc && cterm_normal_bg_gui_color != (long_u)INVALCOLOR)
#endif
|| cterm_normal_bg_color == 0 || *T_UT != NUL));
}
@@ -10293,8 +10293,8 @@ draw_tabline(void)
#ifdef FEAT_GUI
&& !gui.in_use
#endif
-#ifdef FEAT_TERMTRUECOLOR
- && !p_guicolors
+#ifdef FEAT_TERMGUICOLORS
+ && !p_tgc
#endif
);
diff --git a/src/structs.h b/src/structs.h
index 1775256996..50901acd57 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -85,7 +85,7 @@ typedef struct file_buffer buf_T; /* forward declaration */
# include <X11/Intrinsic.h>
# endif
# define guicolor_T long_u /* avoid error in prototypes and
- * make FEAT_TERMTRUECOLOR work */
+ * make FEAT_TERMGUICOLORS work */
# define INVALCOLOR ((guicolor_T)0x1ffffff)
#endif
@@ -913,7 +913,7 @@ typedef struct attr_entry
/* These colors need to be > 8 bits to hold 256. */
short_u fg_color; /* foreground color number */
short_u bg_color; /* background color number */
-# ifdef FEAT_TERMTRUECOLOR
+# ifdef FEAT_TERMGUICOLORS
long_u fg_rgb; /* foreground color RGB */
long_u bg_rgb; /* background color RGB */
# endif
diff --git a/src/syntax.c b/src/syntax.c
index ea4e74c66d..7d4e7b1e2f 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -34,7 +34,7 @@ struct hl_group
int sg_cterm_bg; /* terminal bg color number + 1 */
int sg_cterm_attr; /* Screen attr for color term mode */
/* for when using the GUI */
-#if defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR)
+#if defined(FEAT_GUI) || defined(FEAT_TERMGUICOLORS)
guicolor_T sg_gui_fg; /* GUI foreground color handle */
guicolor_T sg_gui_bg; /* GUI background color handle */
#endif
@@ -99,7 +99,7 @@ static int syn_list_header(int did_header, int outlen, int id);
static int hl_has_settings(int idx, int check_link);
static void highlight_clear(int idx);
-#if defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR)
+#if defined(FEAT_GUI) || defined(FEAT_TERMGUICOLORS)
static void gui_do_one_color(int idx, int do_menu, int do_tooltip);
static guicolor_T color_name2handle(char_u *name);
#endif
@@ -7337,7 +7337,7 @@ do_highlight(
for (idx = 0; idx < highlight_ga.ga_len; ++idx)
highlight_clear(idx);
init_highlight(TRUE, TRUE);
-#if defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR)
+#if defined(FEAT_GUI) || defined(FEAT_TERMGUICOLORS)
if (USE_24BIT)
highlight_gui_started();
#endif
@@ -7792,14 +7792,14 @@ do_highlight(
if (!init)
HL_TABLE()[idx].sg_set |= SG_GUI;
-# if defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR)
+# if defined(FEAT_GUI) || defined(FEAT_TERMGUICOLORS)
/* In GUI guifg colors are only used when recognized */
i = color_name2handle(arg);
if (i != INVALCOLOR || STRCMP(arg, "NONE") == 0
# ifdef FEAT_GUI
|| !(USE_24BIT)
# else
- || !p_guicolors
+ || !p_tgc
# endif
)
{
@@ -7810,7 +7810,7 @@ do_highlight(
HL_TABLE()[idx].sg_gui_fg_name = vim_strsave(arg);
else
HL_TABLE()[idx].sg_gui_fg_name = NULL;
-# if defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR)
+# if defined(FEAT_GUI) || defined(FEAT_TERMGUICOLORS)
# ifdef FEAT_GUI_X11
if (is_menu_group)
gui.menu_fg_pixel = i;
@@ -7835,7 +7835,7 @@ do_highlight(
if (!init)
HL_TABLE()[idx].sg_set |= SG_GUI;
-# if defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR)
+# if defined(FEAT_GUI) || defined(FEAT_TERMGUICOLORS)
/* In GUI guifg colors are only used when recognized */
i = color_name2handle(arg);
if (i != INVALCOLOR || STRCMP(arg, "NONE") == 0 || !USE_24BIT)
@@ -7847,7 +7847,7 @@ do_highlight(
HL_TABLE()[idx].sg_gui_bg_name = vim_strsave(arg);
else
HL_TABLE()[idx].sg_gui_bg_name = NULL;
-# if defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR)
+# if defined(FEAT_GUI) || defined(FEAT_TERMGUICOLORS)
# ifdef FEAT_GUI_X11
if (is_menu_group)
gui.menu_bg_pixel = i;
@@ -8008,7 +8008,7 @@ do_highlight(
* and/or "fg", which have been changed now.
*/
#endif
-#if defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR)
+#if defined(FEAT_GUI) || defined(FEAT_TERMGUICOLORS)
if (USE_24BIT)
highlight_gui_started();
#endif
@@ -8080,7 +8080,7 @@ restore_cterm_colors(void)
cterm_normal_fg_color = 0;
cterm_normal_fg_bold = 0;
cterm_normal_bg_color = 0;
-# ifdef FEAT_TERMTRUECOLOR
+# ifdef FEAT_TERMGUICOLORS
cterm_normal_fg_gui_color = INVALCOLOR;
cterm_normal_bg_gui_color = INVALCOLOR;
# endif
@@ -8134,7 +8134,7 @@ highlight_clear(int idx)
vim_free(HL_TABLE()[idx].sg_gui_sp_name);
HL_TABLE()[idx].sg_gui_sp_name = NULL;
#endif
-#if defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR)
+#if defined(FEAT_GUI) || defined(FEAT_TERMGUICOLORS)
HL_TABLE()[idx].sg_gui_fg = INVALCOLOR;
HL_TABLE()[idx].sg_gui_bg = INVALCOLOR;
#endif
@@ -8158,7 +8158,7 @@ highlight_clear(int idx)
#endif
}
-#if defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR) || defined(PROTO)
+#if defined(FEAT_GUI) || defined(FEAT_TERMGUICOLORS) || defined(PROTO)
/*
* Set the normal foreground and background colors according to the "Normal"
* highlighting group. For X11 also set "Menu", "Scrollbar", and
@@ -8168,7 +8168,7 @@ highlight_clear(int idx)
set_normal_colors(void)
{
#ifdef FEAT_GUI
-# ifdef FEAT_TERMTRUECOLOR
+# ifdef FEAT_TERMGUICOLORS
if (gui.in_use)
# endif
{
@@ -8210,7 +8210,7 @@ set_normal_colors(void)
# endif
}
#endif
-#ifdef FEAT_TERMTRUECOLOR
+#ifdef FEAT_TERMGUICOLORS
# ifdef FEAT_GUI
else
# endif
@@ -8473,7 +8473,7 @@ hl_do_font(
#endif /* FEAT_GUI */
-#if defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR) || defined(PROTO)
+#if defined(FEAT_GUI) || defined(FEAT_TERMGUICOLORS) || defined(PROTO)
/*
* Return the handle for a color name.
* Returns INVALCOLOR when failed.
@@ -8486,31 +8486,31 @@ color_name2handle(char_u *name)
if (STRICMP(name, "fg") == 0 || STRICMP(name, "foreground") == 0)
{
-#if defined(FEAT_TERMTRUECOLOR) && defined(FEAT_GUI)
+#if defined(FEAT_TERMGUICOLORS) && defined(FEAT_GUI)
if (gui.in_use)
#endif
#ifdef FEAT_GUI
return gui.norm_pixel;
#endif
-#if defined(FEAT_TERMTRUECOLOR) && defined(FEAT_GUI)
+#if defined(FEAT_TERMGUICOLORS) && defined(FEAT_GUI)
else
#endif
-#ifdef FEAT_TERMTRUECOLOR
+#ifdef FEAT_TERMGUICOLORS
return cterm_normal_fg_gui_color;
#endif
}
if (STRICMP(name, "bg") == 0 || STRICMP(name, "background") == 0)
{
-#if defined(FEAT_TERMTRUECOLOR) && defined(FEAT_GUI)
+#if defined(FEAT_TERMGUICOLORS) && defined(FEAT_GUI)
if (gui.in_use)
#endif
#ifdef FEAT_GUI
return gui.back_pixel;
#endif
-#if defined(FEAT_TERMTRUECOLOR) && defined(FEAT_GUI)
+#if defined(FEAT_TERMGUICOLORS) && defined(FEAT_GUI)
else
#endif
-#ifdef FEAT_TERMTRUECOLOR
+#ifdef FEAT_TERMGUICOLORS
return cterm_normal_bg_gui_color;
#endif
}
@@ -8595,7 +8595,7 @@ get_attr_entry(garray_T *table, attrentry_T *aep)
== taep->ae_u.cterm.fg_color
&& aep->ae_u.cterm.bg_color
== taep->ae_u.cterm.bg_color
-#ifdef FEAT_TERMTRUECOLOR
+#ifdef FEAT_TERMGUICOLORS
&& aep->ae_u.cterm.fg_rgb
== taep->ae_u.cterm.fg_rgb
&& aep->ae_u.cterm.bg_rgb
@@ -8667,7 +8667,7 @@ get_attr_entry(garray_T *table, attrentry_T *aep)
{
taep->ae_u.cterm.fg_color = aep->ae_u.cterm.fg_color;
taep->ae_u.cterm.bg_color = aep->ae_u.cterm.bg_color;
-#ifdef FEAT_TERMTRUECOLOR
+#ifdef FEAT_TERMGUICOLORS
taep->ae_u.cterm.fg_rgb = aep->ae_u.cterm.fg_rgb;
taep->ae_u.cterm.bg_rgb = aep->ae_u.cterm.bg_rgb;
#endif
@@ -8787,7 +8787,7 @@ hl_combine_attr(int char_attr, int prim_attr)
new_en.ae_u.cterm.fg_color = spell_aep->ae_u.cterm.fg_color;
if (spell_aep->ae_u.cterm.bg_color > 0)
new_en.ae_u.cterm.bg_color = spell_aep->ae_u.cterm.bg_color;
-#ifdef FEAT_TERMTRUECOLOR
+#ifdef FEAT_TERMGUICOLORS
if (spell_aep->ae_u.cterm.fg_rgb != (long_u)INVALCOLOR)
new_en.ae_u.cterm.fg_rgb = spell_aep->ae_u.cterm.fg_rgb;
if (spell_aep->ae_u.cterm.bg_rgb != (long_u)INVALCOLOR)
@@ -9056,7 +9056,7 @@ highlight_color(
return NULL;
if (modec == 'g')
{
-# if defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR)
+# if defined(FEAT_GUI) || defined(FEAT_TERMGUICOLORS)
# ifdef FEAT_GUI
/* return font name */
if (font)
@@ -9115,7 +9115,7 @@ highlight_color(
#endif
#if (defined(FEAT_SYN_HL) \
- && (defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR)) \
+ && (defined(FEAT_GUI) || defined(FEAT_TERMGUICOLORS)) \
&& defined(FEAT_PRINTER)) || defined(PROTO)
/*
* Return color name of highlight group "id" as RGB value.
@@ -9255,7 +9255,7 @@ set_hl_attr(
* highlighting attributes, need to allocate an attr number.
*/
if (sgp->sg_cterm_fg == 0 && sgp->sg_cterm_bg == 0
-# ifdef FEAT_TERMTRUECOLOR
+# ifdef FEAT_TERMGUICOLORS
&& sgp->sg_gui_fg == INVALCOLOR
&& sgp->sg_gui_bg == INVALCOLOR
# endif
@@ -9266,7 +9266,7 @@ set_hl_attr(
at_en.ae_attr = sgp->sg_cterm;
at_en.ae_u.cterm.fg_color = sgp->sg_cterm_fg;
at_en.ae_u.cterm.bg_color = sgp->sg_cterm_bg;
-# ifdef FEAT_TERMTRUECOLOR
+# ifdef FEAT_TERMGUICOLORS
at_en.ae_u.cterm.fg_rgb = GUI_MCH_GET_RGB(sgp->sg_gui_fg);
at_en.ae_u.cterm.bg_rgb = GUI_MCH_GET_RGB(sgp->sg_gui_bg);
# endif
@@ -9420,7 +9420,7 @@ syn_add_group(char_u *name)
vim_memset(&(HL_TABLE()[highlight_ga.ga_len]), 0, sizeof(struct hl_group));
HL_TABLE()[highlight_ga.ga_len].sg_name = name;
HL_TABLE()[highlight_ga.ga_len].sg_name_u = vim_strsave_up(name);
-#if defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR)
+#if defined(FEAT_GUI) || defined(FEAT_TERMGUICOLORS)
HL_TABLE()[highlight_ga.ga_len].sg_gui_bg = INVALCOLOR;
HL_TABLE()[highlight_ga.ga_len].sg_gui_fg = INVALCOLOR;
# ifdef FEAT_GUI
@@ -9518,7 +9518,7 @@ syn_get_final_id(int hl_id)
return hl_id;
}
-#if defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR)
+#if defined(FEAT_GUI) || defined(FEAT_TERMGUICOLORS)
/*
* Call this function just after the GUI has started.
* It finds the font and color handles for the highlighting groups.
@@ -9529,8 +9529,8 @@ highlight_gui_started(void)
int idx;
/* First get the colors from the "Normal" and "Menu" group, if set */
-# if defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR)
-# ifdef FEAT_TERMTRUECOLOR
+# if defined(FEAT_GUI) || defined(FEAT_TERMGUICOLORS)
+# ifdef FEAT_TERMGUICOLORS
if (USE_24BIT)
# endif
set_normal_colors();
@@ -9551,7 +9551,7 @@ gui_do_one_color(
int didit = FALSE;
# ifdef FEAT_GUI
-# ifdef FEAT_TERMTRUECOLOR
+# ifdef FEAT_TERMGUICOLORS
if (gui.in_use)
# endif
if (HL_TABLE()[idx].sg_font_name != NULL)
diff --git a/src/term.c b/src/term.c
index 3c8c0fa02b..4af9aeb846 100644
--- a/src/term.c
+++ b/src/term.c
@@ -77,7 +77,7 @@ struct builtin_term
static struct builtin_term *find_builtin_term(char_u *name);
static void parse_builtin_tcap(char_u *s);
static void term_color(char_u *s, int n);
-#ifdef FEAT_TERMTRUECOLOR
+#ifdef FEAT_TERMGUICOLORS
static void term_rgb_color(char_u *s, long_u rgb);
#endif
static void gather_termleader(void);
@@ -859,7 +859,7 @@ static struct builtin_term builtin_termcaps[] =
{(int)KS_CRV, IF_EB("\033[>c", ESC_STR "[>c")},
{(int)KS_RBG, IF_EB("\033]11;?\007", ESC_STR "]11;?\007")},
{(int)KS_U7, IF_EB("\033[6n", ESC_STR "[6n")},
-# ifdef FEAT_TERMTRUECOLOR
+# ifdef FEAT_TERMGUICOLORS
/* These are printf strings, not terminal codes. */
{(int)KS_8F, IF_EB("\033[38;2;%lu;%lu;%lum", ESC_STR "[38;2;%lu;%lu;%lum")},
{(int)KS_8B, IF_EB("\033[48;2;%lu;%lu;%lum", ESC_STR "[48;2;%lu;%lu;%lum")},
@@ -1265,21 +1265,21 @@ static struct builtin_term builtin_termcaps[] =
}; /* end of builtin_termcaps */
-#if defined(FEAT_TERMTRUECOLOR) || defined(PROTO)
+#if defined(FEAT_TERMGUICOLORS) || defined(PROTO)
guicolor_T
-termtrue_mch_get_color(char_u *name)
+termgui_mch_get_color(char_u *name)
{
return gui_get_color_cmn(name);
}
guicolor_T
-termtrue_get_color(char_u *name)
+termgui_get_color(char_u *name)
{
guicolor_T t;
if (*name == NUL)
return INVALCOLOR;
- t = termtrue_mch_get_color(name);
+ t = termgui_mch_get_color(name);
if (t == INVALCOLOR)
EMSG2(_("E254: Cannot allocate color %s"), name);
@@ -1287,9 +1287,9 @@ termtrue_get_color(char_u *name)
}
long_u
-termtrue_mch_get_rgb(guicolor_T color)
+termgui_mch_get_rgb(guicolor_T color)
{
- return (long_u) color;
+ return (long_u)color;
}
#endif
@@ -2645,7 +2645,7 @@ term_color(char_u *s, int n)
OUT_STR(tgoto((char *)s, 0, n));
}
-#if defined(FEAT_TERMTRUECOLOR) || defined(PROTO)
+#if defined(FEAT_TERMGUICOLORS) || defined(PROTO)
void
term_fg_rgb_color(long_u rgb)
{
@@ -6053,7 +6053,7 @@ update_tcap(int attr)
}
#endif
-#if defined(FEAT_GUI) || defined(FEAT_TERMTRUECOLOR) || defined(PROTO)
+#if defined(FEAT_GUI) || defined(FEAT_TERMGUICOLORS) || defined(PROTO)
static int
hex_digit(int c)
{
diff --git a/src/version.c b/src/version.c
index 44f37a7fc6..5a094475dd 100644
--- a/src/version.c
+++ b/src/version.c
@@ -602,6 +602,11 @@ static char *(features[]) =
#else
"-tcl",
#endif
+#ifdef FEAT_TERMGUICOLORS
+ "+termguicolors",
+#else
+ "-termguicolors",
+#endif
#if defined(UNIX) || defined(__EMX__)
/* only Unix (or OS/2 with EMX!) can have terminfo instead of termcap */
# ifdef TERMINFO
@@ -621,11 +626,6 @@ static char *(features[]) =
#else
"-termresponse",
#endif
-#ifdef FEAT_TERMTRUECOLOR
- "+termtruecolor",
-#else
- "-termtruecolor",
-#endif
#ifdef FEAT_TEXTOBJ
"+textobjects",
#else
@@ -754,6 +754,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1799,
+/**/
1798,
/**/
1797,
diff --git a/src/vim.h b/src/vim.h
index f503ebf3e4..5d98a4c127 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -1559,21 +1559,21 @@ typedef UINT32_TYPEDEF UINT32_T;
#define MSG_PUTS_LONG_ATTR(s, a) msg_puts_long_attr((char_u *)(s), (a))
#ifdef FEAT_GUI
-# ifdef FEAT_TERMTRUECOLOR
-# define GUI_FUNCTION(f) (gui.in_use ? gui_##f : termtrue_##f)
-# define USE_24BIT (gui.in_use || p_guicolors)
+# ifdef FEAT_TERMGUICOLORS
+# define GUI_FUNCTION(f) (gui.in_use ? gui_##f : termgui_##f)
+# define USE_24BIT (gui.in_use || p_tgc)
# else
# define GUI_FUNCTION(f) gui_##f
# define USE_24BIT gui.in_use
# endif
#else
-# ifdef FEAT_TERMTRUECOLOR
-# define GUI_FUNCTION(f) termtrue_##f
-# define USE_24BIT p_guicolors
+# ifdef FEAT_TERMGUICOLORS
+# define GUI_FUNCTION(f) termgui_##f
+# define USE_24BIT p_tgc
# endif
#endif
-#ifdef FEAT_TERMTRUECOLOR
-# define IS_CTERM (t_colors > 1 || p_guicolors)
+#ifdef FEAT_TERMGUICOLORS
+# define IS_CTERM (t_colors > 1 || p_tgc)
#else
# define IS_CTERM (t_colors > 1)
#endif