]> granicus.if.org Git - vim/commitdiff
patch 8.0.0146: termguicolors uses wrong colors on MS-Windows with ConEmu v8.0.0146
authorBram Moolenaar <Bram@vim.org>
Fri, 6 Jan 2017 17:16:19 +0000 (18:16 +0100)
committerBram Moolenaar <Bram@vim.org>
Fri, 6 Jan 2017 17:16:19 +0000 (18:16 +0100)
Problem:    When using 'termguicolors' on MS-Windows the RGB definition causes
            the colors to be wrong.
Solution:   Undefined RGB and use our own. (Gabriel Barta)

src/term.c
src/version.c

index a9c2c57fd0c5ff3487783a1a821f06999dff129a..65b86b2842e426960bc4cb55f6d4a6c14b451bc7 100644 (file)
@@ -6069,8 +6069,12 @@ hex_digit(int c)
     guicolor_T
 gui_get_color_cmn(char_u *name)
 {
-    /* On MS-Windows an RGB macro is available and it's different from ours,
-     * but does what is needed. */
+    /* On MS-Windows an RGB macro is available and it produces 0x00bbggrr color
+     * values as used by the MS-Windows GDI api.  It should be used only for
+     * MS-Windows GDI builds. */
+# if defined(RGB) && defined(WIN32) && !defined(FEAT_GUI)
+#  undef RGB
+# endif
 # ifndef RGB
 #  define RGB(r, g, b) ((r<<16) | (g<<8) | (b))
 # endif
index c3c33dc72ffb17cf0f57555c7c2523f29e6cf6e9..775f7df21846b8a2b986215229442e12c3f1ff85 100644 (file)
@@ -764,6 +764,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    146,
 /**/
     145,
 /**/