From bb2709884feb7914e03e61eaebf2e793367d3539 Mon Sep 17 00:00:00 2001 From: "Andy K. Massimino" Date: Fri, 31 Dec 2021 11:40:36 -0500 Subject: [PATCH] Use more accurate cache for popup props re #202 --- autoload/matchup/matchparen.vim | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/autoload/matchup/matchparen.vim b/autoload/matchup/matchparen.vim index a9e1686..d65f9ad 100644 --- a/autoload/matchup/matchparen.vim +++ b/autoload/matchup/matchparen.vim @@ -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, {