From 0f3f9e22740ed29d4fc07ff028e81335f34797e4 Mon Sep 17 00:00:00 2001 From: "Andy K. Massimino" Date: Sat, 16 Nov 2019 14:50:01 -0500 Subject: [PATCH] Don't show popup if window is too short, fix #81 --- autoload/matchup/matchparen.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/autoload/matchup/matchparen.vim b/autoload/matchup/matchparen.vim index 85d2b20..23ea663 100644 --- a/autoload/matchup/matchparen.vim +++ b/autoload/matchup/matchparen.vim @@ -472,6 +472,7 @@ function! s:matchparen.highlight(...) abort dict " {{{1 let l:method = get(g:matchup_matchparen_offscreen, 'method', '') if !empty(l:method) && l:method !=# 'none' \ && !l:current.skip && !l:scrolling + \ && winheight(0) > 0 call s:do_offscreen(l:current, l:method) endif @@ -516,7 +517,7 @@ function! s:do_offscreen(current, method) " {{{1 call s:do_offscreen_statusline(l:offscreen, 0) elseif a:method ==# 'status_manual' call s:do_offscreen_statusline(l:offscreen, 1) - elseif a:method ==# 'popup' + elseif a:method ==# 'popup' && winheight(0) > 1 if has('nvim') call s:do_offscreen_popup_nvim(l:offscreen) elseif exists('*popup_create')