diff --git a/autoload/matchup/matchparen.vim b/autoload/matchup/matchparen.vim index b468409..272d066 100644 --- a/autoload/matchup/matchparen.vim +++ b/autoload/matchup/matchparen.vim @@ -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 diff --git a/doc/matchup.txt b/doc/matchup.txt index 09a8165..cd7e69b 100644 --- a/doc/matchup.txt +++ b/doc/matchup.txt @@ -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*