To: vim_dev@googlegroups.com Subject: Patch 8.2.0906 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.0906 Problem: When setting 'termguicolors' SpellBad is no longer red. Solution: Only use the RGB guisp color for cterm when using the "underline" or "undercurl" attributes to avoid the background color to be cleared. Also make t_8u empty when the termresponse indicates a real xterm. (closes #6207) Files: src/highlight.c, src/term.c *** ../vim-8.2.0905/src/highlight.c 2020-06-03 10:04:45.720521241 +0200 --- src/highlight.c 2020-06-05 18:48:12.750515152 +0200 *************** *** 2929,2935 **** # endif at_en.ae_u.cterm.fg_rgb = GUI_MCH_GET_RGB2(sgp->sg_gui_fg); at_en.ae_u.cterm.bg_rgb = GUI_MCH_GET_RGB2(sgp->sg_gui_bg); ! at_en.ae_u.cterm.ul_rgb = GUI_MCH_GET_RGB2(sgp->sg_gui_sp); if (at_en.ae_u.cterm.fg_rgb == INVALCOLOR && at_en.ae_u.cterm.bg_rgb == INVALCOLOR) { --- 2929,2940 ---- # endif at_en.ae_u.cterm.fg_rgb = GUI_MCH_GET_RGB2(sgp->sg_gui_fg); at_en.ae_u.cterm.bg_rgb = GUI_MCH_GET_RGB2(sgp->sg_gui_bg); ! // Only use the underline/undercurl color when used, it may clear the ! // background color if not supported. ! if (sgp->sg_cterm & (HL_UNDERLINE | HL_UNDERCURL)) ! at_en.ae_u.cterm.ul_rgb = GUI_MCH_GET_RGB2(sgp->sg_gui_sp); ! else ! at_en.ae_u.cterm.ul_rgb = INVALCOLOR; if (at_en.ae_u.cterm.fg_rgb == INVALCOLOR && at_en.ae_u.cterm.bg_rgb == INVALCOLOR) { *** ../vim-8.2.0905/src/term.c 2020-05-31 16:41:04.646603340 +0200 --- src/term.c 2020-06-05 19:05:38.102272272 +0200 *************** *** 4819,4824 **** --- 4819,4829 ---- if (version < 95) is_not_xterm = TRUE; + // With the real Xterm setting the underline RGB color + // clears the background color, disable "t_8u". + if (!is_not_xterm && *T_8U != NUL) + T_8U = empty_option; + // Only request the cursor style if t_SH and t_RS are // set. Only supported properly by xterm since version // 279 (otherwise it returns 0x18). *** ../vim-8.2.0905/src/version.c 2020-06-04 22:46:01.372159769 +0200 --- src/version.c 2020-06-05 18:49:47.998122432 +0200 *************** *** 748,749 **** --- 748,751 ---- { /* Add new patch number below this line */ + /**/ + 906, /**/ -- press CTRL-ALT-DEL for more information /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///