From 2f0d89f4e111503c0cd8e7bcdaaa8f93e7aef8dc Mon Sep 17 00:00:00 2001 From: Byron Torres Date: Wed, 24 May 2023 12:44:54 +0100 Subject: 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. --- plugin/haredoc.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin/haredoc.vim b/plugin/haredoc.vim index 6cbd507..2ab9695 100644 --- 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, \ #{ -- cgit v1.2.3