From d3474f8301401f4038b83b528da993e7b5694c67 Mon Sep 17 00:00:00 2001 From: "Andy K. Massimino" Date: Fri, 1 Oct 2021 12:04:55 -0400 Subject: [PATCH] Fix offscreen popup, add option syntax_hl, fixes #182 --- autoload/matchup/matchparen.vim | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/autoload/matchup/matchparen.vim b/autoload/matchup/matchparen.vim index 2642b44..0a43cc0 100644 --- a/autoload/matchup/matchparen.vim +++ b/autoload/matchup/matchparen.vim @@ -611,14 +611,17 @@ function! s:do_offscreen_popup(offscreen) " {{{1 \ 'maxheight': 1, \}) + call matchup#perf#tic('matchparen.render_popup') if exists('*prop_type_add') && exists('*popup_settext') + \ && get(g:matchup_matchparen_offscreen, 'syntax_hl', 0) " requires patch 8.1.1553 let l:width = s:set_popup_text_2(l:lnum, l:adjust, a:offscreen) else let l:width = s:set_popup_text(l:lnum, l:adjust, a:offscreen) endif + call matchup#perf#toc('matchparen.render_popup', 'done') - let l:rpad = 1 + let l:rpad = 0 if get(g:matchup_matchparen_offscreen, 'fullwidth', 0) \ && exists('*popup_setoptions') let l:rpad = winwidth(0) - l:width @@ -679,6 +682,11 @@ function! s:set_popup_text_2(lnum, adjust, offscreen) abort for l:item in split(l:sl, '%\@1