To: vim_dev@googlegroups.com Subject: Patch 8.2.4877 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.4877 Problem: MS-Windows: Using Normal colors for termguicolors causes problems. Solution: Do not use Normal colors to set sg_gui_fg and sg_gui_bg. (Christian Brabandt, closes #10317, closes #10241) Files: src/highlight.c *** ../vim-8.2.4876/src/highlight.c 2022-05-02 22:53:41.380211031 +0100 --- src/highlight.c 2022-05-05 21:06:27.494434332 +0100 *************** *** 3283,3309 **** at_en.ae_u.cterm.bg_color = sgp->sg_cterm_bg; at_en.ae_u.cterm.ul_color = sgp->sg_cterm_ul; # ifdef FEAT_TERMGUICOLORS - # ifdef MSWIN - # ifdef VIMDLL - // Only when not using the GUI. - if (!gui.in_use && !gui.starting) - # endif - { - int id; - guicolor_T fg, bg; - - id = syn_name2id((char_u *)"Normal"); - if (id > 0) - { - syn_id2colors(id, &fg, &bg); - if (sgp->sg_gui_fg == INVALCOLOR) - sgp->sg_gui_fg = fg; - if (sgp->sg_gui_bg == INVALCOLOR) - sgp->sg_gui_bg = bg; - } - - } - # 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 --- 3283,3288 ---- *** ../vim-8.2.4876/src/version.c 2022-05-05 20:46:41.407274630 +0100 --- src/version.c 2022-05-05 21:08:24.734372908 +0100 *************** *** 748,749 **** --- 748,751 ---- { /* Add new patch number below this line */ + /**/ + 4877, /**/ -- hundred-and-one symptoms of being an internet addict: 106. When told to "go to your room" you inform your parents that you can't...because you were kicked out and banned. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///