Skip to content

Commit

Permalink
Use more accurate cache for popup props re #202
Browse files Browse the repository at this point in the history
  • Loading branch information
andymass committed Dec 31, 2021
1 parent 4a5bb96 commit bb27098
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions autoload/matchup/matchparen.vim
Original file line number Diff line number Diff line change
Expand Up @@ -720,14 +720,15 @@ function! s:set_popup_text_2(lnum, adjust, offscreen) abort
endif

let l:key = 'matchup__' . l:hl
if !has_key(s:prop_cache, l:key)
if empty(prop_type_get(l:key, {'bufnr': winbufnr(t:match_popup)}))
let l:popup_bufnr = winbufnr(t:match_popup)
if !has_key(s:prop_cache, l:key . '__' . l:popup_bufnr)
if empty(prop_type_get(l:key, {'bufnr': l:popup_bufnr}))
call prop_type_add(l:key, {
\ 'bufnr': winbufnr(t:match_popup),
\ 'bufnr': l:popup_bufnr,
\ 'highlight': l:hl
\})
endif
let s:prop_cache[l:key] = 1
let s:prop_cache[l:key . '__' . l:popup_bufnr] = 1
endif

call add(l:props, {
Expand Down

0 comments on commit bb27098

Please sign in to comment.