mirror of
https://github.com/vim/vim.git
synced 2025-09-26 04:04:07 -04:00
patch 7.4.1854
Problem: When setting 'termguicolors' the Ignore highlighting doesn't work. (Charles Campbell) Solution: Handle the color names "fg" and "bg" when the GUI isn't running and no colors are speficied, fall back to black and white.
This commit is contained in:
13
src/syntax.c
13
src/syntax.c
@@ -8486,11 +8486,11 @@ color_name2handle(char_u *name)
|
|||||||
#ifdef FEAT_GUI
|
#ifdef FEAT_GUI
|
||||||
return gui.norm_pixel;
|
return gui.norm_pixel;
|
||||||
#endif
|
#endif
|
||||||
#if defined(FEAT_TERMGUICOLORS) && defined(FEAT_GUI)
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
#ifdef FEAT_TERMGUICOLORS
|
#ifdef FEAT_TERMGUICOLORS
|
||||||
|
if (cterm_normal_fg_gui_color != (long_u)INVALCOLOR)
|
||||||
return cterm_normal_fg_gui_color;
|
return cterm_normal_fg_gui_color;
|
||||||
|
/* Guess that the foreground is black or white. */
|
||||||
|
return GUI_GET_COLOR((char_u *)(*p_bg == 'l' ? "black" : "white"));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
if (STRICMP(name, "bg") == 0 || STRICMP(name, "background") == 0)
|
if (STRICMP(name, "bg") == 0 || STRICMP(name, "background") == 0)
|
||||||
@@ -8501,11 +8501,11 @@ color_name2handle(char_u *name)
|
|||||||
#ifdef FEAT_GUI
|
#ifdef FEAT_GUI
|
||||||
return gui.back_pixel;
|
return gui.back_pixel;
|
||||||
#endif
|
#endif
|
||||||
#if defined(FEAT_TERMGUICOLORS) && defined(FEAT_GUI)
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
#ifdef FEAT_TERMGUICOLORS
|
#ifdef FEAT_TERMGUICOLORS
|
||||||
|
if (cterm_normal_bg_gui_color != (long_u)INVALCOLOR)
|
||||||
return cterm_normal_bg_gui_color;
|
return cterm_normal_bg_gui_color;
|
||||||
|
/* Guess that the background is white or black. */
|
||||||
|
return GUI_GET_COLOR((char_u *)(*p_bg == 'l' ? "white" : "black"));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -8595,7 +8595,6 @@ get_attr_entry(garray_T *table, attrentry_T *aep)
|
|||||||
&& aep->ae_u.cterm.bg_rgb
|
&& aep->ae_u.cterm.bg_rgb
|
||||||
== taep->ae_u.cterm.bg_rgb
|
== taep->ae_u.cterm.bg_rgb
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
)))
|
)))
|
||||||
|
|
||||||
return i + ATTR_OFF;
|
return i + ATTR_OFF;
|
||||||
|
@@ -753,6 +753,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1854,
|
||||||
/**/
|
/**/
|
||||||
1853,
|
1853,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user