From 242864c0e23041138d84c8b28e6170167214990d Mon Sep 17 00:00:00 2001 From: "Andy K. Massimino" Date: Sat, 8 May 2021 20:57:09 -0400 Subject: [PATCH] Show TS close hint in floating win --- autoload/matchup/matchparen.vim | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/autoload/matchup/matchparen.vim b/autoload/matchup/matchparen.vim index 056416d..7e6c18a 100644 --- a/autoload/matchup/matchparen.vim +++ b/autoload/matchup/matchparen.vim @@ -721,8 +721,13 @@ function! s:populate_floating_win(offscreen) " {{{1 if exists('*nvim_open_win') " neovim floating win let width = max(map(copy(l:body), 'strdisplaywidth(v:val)')) + if empty(a:offscreen.links.close.match) + " include the closing hint + let l:width += 3 + len(a:offscreen.links.open.match) + endif let l:width += wincol()-virtcol('.') call nvim_win_set_width(s:float_id, l:width + 1) + if &winminheight != 1 let l:save_wmh = &winminheight let &winminheight = 1 @@ -731,6 +736,7 @@ function! s:populate_floating_win(offscreen) " {{{1 else call nvim_win_set_height(s:float_id, l:height) endif + call nvim_win_set_option(s:float_id, 'wrap', v:false) silent! call nvim_win_set_option(s:float_id, 'scrolloff', 0) call nvim_win_set_cursor(s:float_id, [l:lnum, 0])