From e6f1786a141df9879af1c1352ee28d23a6568564 Mon Sep 17 00:00:00 2001 From: "Andy K. Massimino" Date: Sat, 21 Mar 2020 11:20:05 -0400 Subject: [PATCH] Set wmh temporarily for floating win, fix #91 --- autoload/matchup/matchparen.vim | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/autoload/matchup/matchparen.vim b/autoload/matchup/matchparen.vim index ade9afb..b468409 100644 --- a/autoload/matchup/matchparen.vim +++ b/autoload/matchup/matchparen.vim @@ -647,7 +647,14 @@ function! s:populate_floating_win(offscreen) " {{{1 let width = max(map(copy(l:body), 'strdisplaywidth(v:val)')) let l:width += wincol()-virtcol('.') call nvim_win_set_width(s:float_id, l:width + 1) - call nvim_win_set_height(s:float_id, l:height) + if &winminheight != 1 + let l:save_wmh = &winminheight + let &winminheight = 1 + call nvim_win_set_height(s:float_id, l:height) + let &winminheight = l:save_wmh + else + call nvim_win_set_height(s:float_id, l:height) + endif call nvim_win_set_cursor(s:float_id, [l:lnum, 0]) call nvim_win_set_option(s:float_id, 'wrap', v:false) endif