mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.0.1362: terminal window colors wrong when using Terminal highlighting
Problem: Terminal window colors wrong when using Terminal highlighting. Solution: Set ansi_index when setting the default color. Also cache the color index for Terminal. (Ozaki Kiichi, closes #2393)
This commit is contained in:
12
src/syntax.c
12
src/syntax.c
@@ -7391,6 +7391,9 @@ do_highlight(
|
||||
int error = FALSE;
|
||||
int color;
|
||||
int is_normal_group = FALSE; /* "Normal" group */
|
||||
#ifdef FEAT_TERMINAL
|
||||
int is_terminal_group = FALSE; /* "Terminal" group */
|
||||
#endif
|
||||
#ifdef FEAT_GUI_X11
|
||||
int is_menu_group = FALSE; /* "Menu" group */
|
||||
int is_scrollbar_group = FALSE; /* "Scrollbar" group */
|
||||
@@ -7616,6 +7619,10 @@ do_highlight(
|
||||
|
||||
if (STRCMP(HL_TABLE()[idx].sg_name_u, "NORMAL") == 0)
|
||||
is_normal_group = TRUE;
|
||||
#ifdef FEAT_TERMINAL
|
||||
else if (STRCMP(HL_TABLE()[idx].sg_name_u, "TERMINAL") == 0)
|
||||
is_terminal_group = TRUE;
|
||||
#endif
|
||||
#ifdef FEAT_GUI_X11
|
||||
else if (STRCMP(HL_TABLE()[idx].sg_name_u, "MENU") == 0)
|
||||
is_menu_group = TRUE;
|
||||
@@ -8239,6 +8246,11 @@ do_highlight(
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#ifdef FEAT_TERMINAL
|
||||
else if (is_terminal_group)
|
||||
set_terminal_default_colors(
|
||||
HL_TABLE()[idx].sg_cterm_fg, HL_TABLE()[idx].sg_cterm_bg);
|
||||
#endif
|
||||
#ifdef FEAT_GUI_X11
|
||||
# ifdef FEAT_MENU
|
||||
else if (is_menu_group)
|
||||
|
Reference in New Issue
Block a user