Problem: pum: When the Pmenu highlight group has no guibg/ctermbg the
popup menu becomes fully transparent.
Solution: Create an entry if no popup_attr exists (highlight group
cleared for example), and test if popup_attr exists but
without guibg/ctermbg attributes to fallback to normal bg
color. Similar to patch 9.2.0602 for popup window
without this patch:
pum-opacity-without-patch.png (view on web)
With this patch:
pum-opacity-with-patch.png (view on web)
To reproduce: source a testfile containing
set pumopt=opacity:50,border:round set completeopt=menu set background=dark highlight clear Pmenu highlight clear PmenuSel highlight Underbg ctermbg=red guibg=red highlight Underfg ctermfg=green guifg=green call setline(1, '') for i in range(10) call append(line('$'), ' X YYY ZZZ X YYY X X X X X X') endfor call matchadd('Underbg', 'YYY') call matchadd('Underfg', 'ZZZ') normal gg inoremap <F5> <Cmd>call complete(col('.'), \ ['item', 'another item', 'and a last one'])<CR>
with
vim --clean -S test-pum-opacity-hlnone.vimswitch to insert mode then press <F5>
https://github.com/vim/vim/pull/20638
(6 files)
—
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.![]()