From 37f8df882463431888dbaf205ce3ea6488cf4702 Mon Sep 17 00:00:00 2001 From: Björn Linse Date: Sun, 20 Jan 2019 21:23:17 +0100 Subject: UI: implement 'pumblend' option for semi-transparent popupmenu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Why? - Because we can. - Because the TUI is just another GUI™ - Because it looks kinda nice, and provides useful context like 1 out of 100 times Complies with "don't pay for what you don't use". Some crashes for resizing were unfolded, add tests for those. --- src/nvim/highlight.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/nvim/highlight.h') 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 -- cgit