diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2021-03-26 00:45:27 +0100 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2021-04-04 18:32:31 +0200 |
commit | a4d3804837e865ca11d2fd0701d23f7eda4da4e4 (patch) | |
tree | 30821b71b5f77edd8b2d195c41f09dc8a8e19231 /src/nvim/highlight.c | |
parent | 76f5c72860b237d66c949dcdeb6967047810b956 (diff) | |
download | rneovim-a4d3804837e865ca11d2fd0701d23f7eda4da4e4.tar.gz rneovim-a4d3804837e865ca11d2fd0701d23f7eda4da4e4.tar.bz2 rneovim-a4d3804837e865ca11d2fd0701d23f7eda4da4e4.zip |
Border: allow to enable/disable specific border edges
Diffstat (limited to 'src/nvim/highlight.c')
-rw-r--r-- | src/nvim/highlight.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/nvim/highlight.c b/src/nvim/highlight.c index 329c448cf0..79801262cb 100644 --- a/src/nvim/highlight.c +++ b/src/nvim/highlight.c @@ -8,6 +8,7 @@ #include "nvim/highlight_defs.h" #include "nvim/map.h" #include "nvim/message.h" +#include "nvim/option.h" #include "nvim/popupmnu.h" #include "nvim/screen.h" #include "nvim/syntax.h" @@ -342,16 +343,24 @@ void update_window_hl(win_T *wp, bool invalid) wp->w_hl_attrs[hlf] = attr; } + wp->w_float_config.shadow = false; if (wp->w_floating && wp->w_float_config.border) { for (int i = 0; i < 8; i++) { int attr = wp->w_hl_attrs[HLF_BORDER]; if (wp->w_float_config.border_hl_ids[i]) { attr = hl_get_ui_attr(HLF_BORDER, wp->w_float_config.border_hl_ids[i], false); + HlAttrs a = syn_attr2entry(attr); + if (a.hl_blend) { + wp->w_float_config.shadow = true; + } } wp->w_float_config.border_attr[i] = attr; } } + + // shadow might cause blending + check_blending(wp); } /// Gets HL_UNDERLINE highlight. |