diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-11-11 15:12:58 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-11 15:12:58 +0800 |
commit | 6c3e170e5668e72b2b144a86b4e8278bc70daa48 (patch) | |
tree | a3ccf7e60f49c83de4fd49f52badbdea5d4b4ef9 /src | |
parent | fdaf6bc5573f578d100321dfc084d513884fd73a (diff) | |
download | rneovim-6c3e170e5668e72b2b144a86b4e8278bc70daa48.tar.gz rneovim-6c3e170e5668e72b2b144a86b4e8278bc70daa48.tar.bz2 rneovim-6c3e170e5668e72b2b144a86b4e8278bc70daa48.zip |
fix(highlight): apply 'winblend' to float border (#25981)
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/highlight.c | 13 | ||||
-rw-r--r-- | src/nvim/option.c | 2 |
2 files changed, 10 insertions, 5 deletions
diff --git a/src/nvim/highlight.c b/src/nvim/highlight.c index 88bf5dbd6e..a0114bbbe8 100644 --- a/src/nvim/highlight.c +++ b/src/nvim/highlight.c @@ -374,10 +374,15 @@ void update_window_hl(win_T *wp, bool invalid) if (wp->w_float_config.border_hl_ids[i]) { attr = hl_get_ui_attr(ns_id, 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; - } + } + HlAttrs a = syn_attr2entry(attr); + if (a.hl_blend == -1 && wp->w_p_winbl > 0) { + HlEntry entry = attr_entry(attr); + a.hl_blend = entry.attr.hl_blend = (int)wp->w_p_winbl; + attr = get_attr_entry(entry); + } + if (a.hl_blend > 0) { + wp->w_float_config.shadow = true; } wp->w_float_config.border_attr[i] = attr; } diff --git a/src/nvim/option.c b/src/nvim/option.c index 7005b63cac..690a03f1a0 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -2686,7 +2686,7 @@ static const char *did_set_winblend(optset_T *args) if (value != old_value) { win->w_p_winbl = MAX(MIN(win->w_p_winbl, 100), 0); win->w_hl_needs_update = true; - check_blending(curwin); + check_blending(win); } return NULL; |