From: Hirohito Higashi Date: Wed, 29 Jul 2026 18:38:53 +0000 (+0000) Subject: patch 9.2.0872: popup with opacity does not use the font of the highlight group X-Git-Tag: v9.2.0872^0 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b34beebd24e7636149fd770f04838973f29f1706;p=thirdparty%2Fvim.git patch 9.2.0872: popup with opacity does not use the font of the highlight group Problem: When a popup window has an opacity between 0 and 99 the "font" item of its highlight group is ignored and the regular font is used instead. The same applies to "ctermfont", and to the popup menu when the "opacity:" value of 'pumopt' is used (Salman Halim). Solution: Also take the font from the popup highlight when blending the cell attributes (Hirohito Higashi) fixes: #20551 closes: #20866 Co-Authored-By: Claude Opus 5 (1M context) Signed-off-by: Hirohito Higashi Signed-off-by: Christian Brabandt --- diff --git a/src/highlight.c b/src/highlight.c index 1b9cbed7c2..4914526fbe 100644 --- a/src/highlight.c +++ b/src/highlight.c @@ -3466,14 +3466,18 @@ hl_blend_attr(int char_attr, int popup_attr, int blend, int blend_fg UNUSED) else { // blend_fg=FALSE: popup text is opaque. Replace the - // underlying cell's attribute flags, fg and special - // color with the popup's, so the underlying syntax + // underlying cell's attribute flags, fg, special color + // and font with the popup's, so the underlying syntax // highlighting and any decoration (textprop undercurl, // ...) do not bleed through. new_en.ae_attr = popup_aep->ae_attr; // fallback correctly to Normal fg color if fg_color == INVALCOLOR new_en.ae_u.gui.fg_color = popup_aep->ae_u.gui.fg_color; new_en.ae_u.gui.sp_color = popup_aep->ae_u.gui.sp_color; + new_en.ae_u.gui.font = popup_aep->ae_u.gui.font; +# ifdef FEAT_XFONTSET + new_en.ae_u.gui.fontset = popup_aep->ae_u.gui.fontset; +# endif } // Blend background color: blend popup bg toward underlying bg { @@ -3547,8 +3551,8 @@ hl_blend_attr(int char_attr, int popup_attr, int blend, int blend_fg UNUSED) if (!blend_fg) { // blend_fg=FALSE: popup text is opaque. Replace the - // underlying cell's attribute flags, fg and underline - // color with the popup's, so the underlying syntax + // underlying cell's attribute flags, fg, underline color + // and font with the popup's, so the underlying syntax // highlighting and any decoration (textprop undercurl, // ...) do not bleed through. When the popup has no fg // (e.g. "guifg=NONE") fall back to Normal's fg so the @@ -3564,6 +3568,7 @@ hl_blend_attr(int char_attr, int popup_attr, int blend, int blend_fg UNUSED) // black-ish or white-ish new_en.ae_u.cterm.fg_color = (*p_bg == 'l') ? 1 : 16; new_en.ae_u.cterm.ul_color = popup_aep->ae_u.cterm.ul_color; + new_en.ae_u.cterm.font = popup_aep->ae_u.cterm.font; #ifdef FEAT_TERMGUICOLORS new_en.ae_u.cterm.ul_rgb = popup_aep->ae_u.cterm.ul_rgb; #endif diff --git a/src/version.c b/src/version.c index 725d66af7f..c7eac10f8f 100644 --- a/src/version.c +++ b/src/version.c @@ -758,6 +758,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 872, /**/ 871, /**/