fix(highlight): apply 'winblend' to float border (#25981)

This commit is contained in:
zeertzjq
2023-11-11 15:12:58 +08:00
committed by GitHub
parent fdaf6bc557
commit 6c3e170e56
3 changed files with 69 additions and 9 deletions

View File

@@ -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;
}