aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/highlight.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-05-10 23:46:50 +0800
committerGitHub <noreply@github.com>2023-05-10 23:46:50 +0800
commit03ca36d1f8d027c95edd46f3127284e9a3577990 (patch)
tree92beb73994a6c8fff02ed68caa2b09d9a79e673d /src/nvim/highlight.c
parent5ac2e47acc999472042df4f10f8f7b5ffa72ba3e (diff)
downloadrneovim-03ca36d1f8d027c95edd46f3127284e9a3577990.tar.gz
rneovim-03ca36d1f8d027c95edd46f3127284e9a3577990.tar.bz2
rneovim-03ca36d1f8d027c95edd46f3127284e9a3577990.zip
fix(highlight): apply 'winblend' to NormalNC (#23555)
Diffstat (limited to 'src/nvim/highlight.c')
-rw-r--r--src/nvim/highlight.c9
1 files changed, 9 insertions, 0 deletions
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)