Allow overriding highlight in popup window, re #93

This commit is contained in:
Andy K. Massimino
2020-04-07 08:27:41 -04:00
parent e6f1786a14
commit 189bbb1453
2 changed files with 13 additions and 3 deletions

View File

@@ -562,9 +562,11 @@ function! s:ensure_match_popup() abort " {{{1
endif
" create a popup and store its winid
let t:match_popup = popup_create('', {
\ 'hidden': v:true,
\})
let l:opts = {'hidden': v:true}
if has_key(g:matchup_matchparen_offscreen, 'highlight')
let l:opts.highlight = g:matchup_matchparen_offscreen.highlight
endif
let t:match_popup = popup_create('', l:opts)
if !has('patch-8.1.1406')
" in case 'hidden' in popup_create-usage is unimplemented

View File

@@ -633,6 +633,14 @@ Module matchparen~
Default: 0
highlight~
For popup method on vim only: set to a highlight group to override the
colors in the popup window. The default is to use *hl-Pmenu*. Example:
>
highlight! OffscreenPopup guibg=red guifg=blue
let g:matchup_matchparen_offscreen
\ = {'method': 'popup', 'highlight': 'OffscreenPopup'}
<
Default: `{'method': 'status'}`
*g:matchup_matchparen_stopline*