From 03ca36d1f8d027c95edd46f3127284e9a3577990 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 10 May 2023 23:46:50 +0800 Subject: fix(highlight): apply 'winblend' to NormalNC (#23555) --- src/nvim/highlight.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src') diff --git a/src/nvim/highlight.c b/src/nvim/highlight.c index e2f3e2aafa..cc332c530d 100644 --- a/src/nvim/highlight.c +++ b/src/nvim/highlight.c @@ -398,6 +398,15 @@ void update_window_hl(win_T *wp, bool invalid) } else { wp->w_hl_attr_normalnc = hl_def[HLF_INACTIVE]; } + + // if blend= attribute is not set, 'winblend' value overrides it. + if (wp->w_floating && wp->w_p_winbl > 0) { + HlEntry entry = kv_A(attr_entries, wp->w_hl_attr_normalnc); + if (entry.attr.hl_blend == -1) { + entry.attr.hl_blend = (int)wp->w_p_winbl; + wp->w_hl_attr_normalnc = get_attr_entry(entry); + } + } } void update_ns_hl(int ns_id) -- cgit