Ever since GVim 9.2.0017 in Windows, when opacity was first introduced to popups, setting any value for opacity other than 100 ignores any font settings and defaults to the main font being used. I currently have 9.2.0649 and used git bisect to narrow it down to 9.2.0017.
This script can be used to see an example of two popups, one that's opaque and shows the custom font and one that doesn't.
set nocompatible
silent! call prop_type_add( 'Visual', { highlight: 'Visual' } )
" Current font is NOT Courier New with size 15
hi hl-PopupNotification font=Courier_New:h15
" Vim popup with 50% opacity and a custom font
let g:seeThrough = popup_notification('This is a popup with 50% opacity and a custom font', {
\ 'line': 20,
\ 'zindex': 10,
\ 'border': [],
\ 'padding': [1, 2],
\ 'maxwidth': 20,
\ 'maxheight': 5,
\ 'time': 50000,
\ 'opacity': 50,
\ 'title': 'See-through',
\ 'wrap': v:false,
\ 'highlight': 'hl-PopupNotification'
\ })
let g:opaque = popup_notification('This is a popup with no opacity and a custom font', {
\ 'line': 10,
\ 'zindex': 10,
\ 'border': [],
\ 'padding': [1, 2],
\ 'maxwidth': 20,
\ 'maxheight': 5,
\ 'time': 50000,
\ 'title': 'Opaque',
\ 'wrap': v:false,
\ 'highlight': 'hl-PopupNotification'
\ })
A popup with a non-100 opacity should honour the font setting, just as a popup that's not see-through does.
9.2.0017 onward (tested most recently in 9.2.0649)
Windows 10 and Windows 11, GVim
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()