diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-01-06 18:16:19 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-01-06 18:16:19 +0100 |
commit | 287266527abc163e191a06dd70518bbbdab4468f (patch) | |
tree | ca40cfb70d41b0db191d54f8da42a7e397674c0c /src/term.c | |
parent | 29891c4ed4a7d08af1ba1628933a387adf5c1555 (diff) | |
download | vim-287266527abc163e191a06dd70518bbbdab4468f.zip |
patch 8.0.0146: termguicolors uses wrong colors on MS-Windows with ConEmu
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)
Diffstat (limited to 'src/term.c')
-rw-r--r-- | src/term.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/term.c b/src/term.c index a9c2c57fd..65b86b284 100644 --- a/src/term.c +++ b/src/term.c @@ -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 |