vim-haredoc

[vim] haredoc plugin
git clone https://git.torresjrjr.com/vim-haredoc.git
Log | Files | Refs | README | LICENSE

commit 2f0d89f4e111503c0cd8e7bcdaaa8f93e7aef8dc
parent 8fccb8b954ab1f831b58ed7ff9cc3f55655927c0
Author: Byron Torres <b@torresjrjr.com>
Date:   Wed, 24 May 2023 12:44:54 +0100

mend blank popups

On some environments, the popup would appear as though the pager less is
displaying a blank page, as if haredoc failed to produce output. The
haredoc command has recently suffered from some output bugs. Adding some
"waiting time" between the term_start() and popup_atcursor() calls, like
another function call, mends the blank behaviour.

Diffstat:
Mplugin/haredoc.vim | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/plugin/haredoc.vim b/plugin/haredoc.vim @@ -35,9 +35,6 @@ function Haredoc(symbol) endif if popup && has('popupwin') && has('terminal') - let minheight = 1 + system( - \ "haredoc -Ftty '"..symbol.."' 2>&1 | wc -l" - \ ) let buf = term_start( \ [ \ 'sh', '-c', @@ -45,6 +42,9 @@ function Haredoc(symbol) \ ], \ #{hidden: 1, term_finish: 'close'}, \ ) + let minheight = 1 + system( + \ "haredoc -Ftty '"..symbol.."' 2>&1 | wc -l" + \ ) let winid = popup_atcursor( \ buf, \ #{