diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-05-31 16:42:30 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-05-31 16:42:30 +0200 |
commit | e023e88bed3f2e0a7ea4cf10cac2de80bc9c271c (patch) | |
tree | f08d1259998303ef883ab394c2fe60196aeaf714 /src/screen.c | |
parent | b10090928cb5283f867e8457b7eea0985470d8d4 (diff) | |
download | vim-git-e023e88bed3f2e0a7ea4cf10cac2de80bc9c271c.tar.gz |
patch 8.2.0863: cannot set a separate color for underline/undercurlv8.2.0863
Problem: Cannot set a separate color for underline/undercurl.
Solution: Add the t_AU and t_8u termcap codes. (Timur Celik, closes #6011)
Diffstat (limited to 'src/screen.c')
-rw-r--r-- | src/screen.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/screen.c b/src/screen.c index 9dac324b9..ea7aaa67f 100644 --- a/src/screen.c +++ b/src/screen.c @@ -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); } |