]> granicus.if.org Git - vim/commitdiff
patch 8.2.4877: MS-Windows: Wrongly using Normal colors for termguicolors v8.2.4877
authorChristian Brabandt <cb@256bit.org>
Thu, 5 May 2022 20:09:54 +0000 (21:09 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 5 May 2022 20:09:54 +0000 (21:09 +0100)
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)

src/highlight.c
src/version.c

index 1e6f9c70666bfd79a80f5f7d2dbd5e682aa3440f..3f46a072761c0ed2efb61a441abba298a567c88b 100644 (file)
@@ -3283,27 +3283,6 @@ set_hl_attr(
        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
index 535d4eb09c04800feabd819917089ac193e8c3ad..e3aa288af92e9f50f0acfc2e84ab01f0433b273d 100644 (file)
@@ -746,6 +746,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    4877,
 /**/
     4876,
 /**/