Skip to content

Commit 2872665

Browse files
committed
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)
1 parent 29891c4 commit 2872665

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

src/term.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6069,8 +6069,12 @@ hex_digit(int c)
60696069
guicolor_T
60706070
gui_get_color_cmn(char_u *name)
60716071
{
6072-
/* On MS-Windows an RGB macro is available and it's different from ours,
6073-
* but does what is needed. */
6072+
/* On MS-Windows an RGB macro is available and it produces 0x00bbggrr color
6073+
* values as used by the MS-Windows GDI api. It should be used only for
6074+
* MS-Windows GDI builds. */
6075+
# if defined(RGB) && defined(WIN32) && !defined(FEAT_GUI)
6076+
# undef RGB
6077+
# endif
60746078
# ifndef RGB
60756079
# define RGB(r, g, b) ((r<<16) | (g<<8) | (b))
60766080
# endif

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,8 @@ static char *(features[]) =
764764

765765
static int included_patches[] =
766766
{ /* Add new patch number below this line */
767+
/**/
768+
146,
767769
/**/
768770
145,
769771
/**/

0 commit comments

Comments
 (0)