aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2017-08-05 23:29:02 +0200
committerJustin M. Keyes <justinkz@gmail.com>2017-08-06 02:51:49 +0200
commitd801ce70c1fb8dd8b3735ca9e06158aaf48203ba (patch)
tree9079f291d053737315f0523300571ce3d4b6a2e9
parent50c8f19d614d4752ac1d2d19b5bc7c05f6d354f9 (diff)
downloadrneovim-d801ce70c1fb8dd8b3735ca9e06158aaf48203ba.tar.gz
rneovim-d801ce70c1fb8dd8b3735ca9e06158aaf48203ba.tar.bz2
rneovim-d801ce70c1fb8dd8b3735ca9e06158aaf48203ba.zip
win_defs.h: redefine RGB macro after undefining
Before this change, if os_defs.h was included after macros.h then win_defs.h would undefine our own RGB macro. vim-patch:8.0.0146
-rw-r--r--src/nvim/os/win_defs.h9
-rw-r--r--src/nvim/version.c2
2 files changed, 8 insertions, 3 deletions
diff --git a/src/nvim/os/win_defs.h b/src/nvim/os/win_defs.h
index 7ed70f6092..8fd2e51f8b 100644
--- a/src/nvim/os/win_defs.h
+++ b/src/nvim/os/win_defs.h
@@ -30,8 +30,13 @@
#define USE_CRNL
-// We have our own RGB macro in macros.h.
-#undef RGB
+// Windows defines a RGB macro that produces 0x00bbggrr color values for use
+// with GDI. Our macro is different, and we don't use GDI.
+#if defined(RGB)
+# undef RGB
+ // Duplicated from macros.h to avoid include-order sensitivity.
+# define RGB(r, g, b) ((r << 16) | (g << 8) | b)
+#endif
#ifdef _MSC_VER
# ifndef inline
diff --git a/src/nvim/version.c b/src/nvim/version.c
index c443b63bb0..81152bbaa4 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -806,7 +806,7 @@ static const int included_patches[] = {
// 149,
// 148,
// 147,
- // 146,
+ 146,
// 145 NA
// 144 NA
// 143,