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)
diff --git a/src/screen.c b/src/screen.c
index 9dac324..ea7aaa6 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -1866,6 +1866,19 @@
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 @@
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 @@
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);
}