Commit: patch 9.2.0872: popup with opacity does not use the font of the highlight group
Christian Brabandt <[email protected]> Wed, 29 Jul 2026 20:45:09 +0200
| Newsgroups | gmane.editors.vim.devel |
|---|---|
| Message-ID | <[email protected]> |
patch 9.2.0872: popup with opacity does not use the font of the highlight group Commit: https://github.com/vim/vim/commit/b34beebd24e7636149fd770f04838973f29f1706 Author: Hirohito Higashi <[email protected]> Date: Wed Jul 29 18:38:53 2026 +0000 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) <[email protected]> Signed-off-by: Hirohito Higashi <[email protected]> Signed-off-by: Christian Brabandt <[email protected]> diff --git a/src/highlight.c b/src/highlight.c index 1b9cbed7c..4914526fb 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 725d66af7..c7eac10f8 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, /**/ -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/vim_dev/E1wp9HB-002sY0-3h%40256bit.org.