aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/highlight.h
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2019-02-07 17:52:58 +0100
committerGitHub <noreply@github.com>2019-02-07 17:52:58 +0100
commitfa2580f953204e919a13388ce5af2edf3afd0594 (patch)
tree4ebb1634d1d0e16ae3d16d56c22e63602ef0efe4 /src/nvim/highlight.h
parented0e96cd28f870c4a580c9e8ab74340fecc90fcb (diff)
parent37f8df882463431888dbaf205ce3ea6488cf4702 (diff)
downloadrneovim-fa2580f953204e919a13388ce5af2edf3afd0594.tar.gz
rneovim-fa2580f953204e919a13388ce5af2edf3afd0594.tar.bz2
rneovim-fa2580f953204e919a13388ce5af2edf3afd0594.zip
Merge pull request #9571 from bfredl/pum_transparent
UI: implement 'pumblend' option for semi-transparent popupmenu
Diffstat (limited to 'src/nvim/highlight.h')
-rw-r--r--src/nvim/highlight.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/nvim/highlight.h b/src/nvim/highlight.h
index 6be0d6200b..a237ddbc34 100644
--- a/src/nvim/highlight.h
+++ b/src/nvim/highlight.h
@@ -10,4 +10,12 @@
# include "highlight.h.generated.h"
#endif
+# define HL_SET_DEFAULT_COLORS(rgb_fg, rgb_bg, rgb_sp) \
+ do { \
+ bool dark_ = (*p_bg == 'd'); \
+ rgb_fg = rgb_fg != -1 ? rgb_fg : (dark_ ? 0xFFFFFF : 0x000000); \
+ rgb_bg = rgb_bg != -1 ? rgb_bg : (dark_ ? 0x000000 : 0xFFFFFF); \
+ rgb_sp = rgb_sp != -1 ? rgb_sp : 0xFF0000; \
+ } while (0);
+
#endif // NVIM_HIGHLIGHT_H