0
0
mirror of https://github.com/vim/vim.git synced 2025-10-01 04:54:07 -04:00

patch 8.2.0863: cannot set a separate color for underline/undercurl

Problem:    Cannot set a separate color for underline/undercurl.
Solution:   Add the t_AU and t_8u termcap codes. (Timur Celik, closes #6011)
This commit is contained in:
Bram Moolenaar
2020-05-31 16:42:30 +02:00
parent b10090928c
commit e023e88bed
12 changed files with 118 additions and 24 deletions

View File

@@ -1866,6 +1866,19 @@ screen_start_highlight(int attr)
if (aep->ae_u.cterm.bg_color)
term_bg_color(aep->ae_u.cterm.bg_color - 1);
}
#ifdef FEAT_TERMGUICOLORS
if (p_tgc && aep->ae_u.cterm.ul_rgb != CTERMCOLOR)
{
if (aep->ae_u.cterm.ul_rgb != INVALCOLOR)
term_ul_rgb_color(aep->ae_u.cterm.ul_rgb);
}
else
#endif
if (t_colors > 1)
{
if (aep->ae_u.cterm.ul_color)
term_ul_color(aep->ae_u.cterm.ul_color - 1);
}
if (!IS_CTERM)
{
@@ -2021,6 +2034,8 @@ screen_stop_highlight(void)
term_fg_rgb_color(cterm_normal_fg_gui_color);
if (cterm_normal_bg_gui_color != INVALCOLOR)
term_bg_rgb_color(cterm_normal_bg_gui_color);
if (cterm_normal_ul_gui_color != INVALCOLOR)
term_ul_rgb_color(cterm_normal_ul_gui_color);
}
else
#endif
@@ -2032,6 +2047,8 @@ screen_stop_highlight(void)
term_fg_color(cterm_normal_fg_color - 1);
if (cterm_normal_bg_color != 0)
term_bg_color(cterm_normal_bg_color - 1);
if (cterm_normal_ul_color != 0)
term_ul_color(cterm_normal_ul_color - 1);
if (cterm_normal_fg_bold)
out_str(T_MD);
}