aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorByron Torres <b@torresjrjr.com>2023-05-24 12:44:54 +0100
committerByron Torres <b@torresjrjr.com>2023-05-24 12:44:54 +0100
commit2f0d89f4e111503c0cd8e7bcdaaa8f93e7aef8dc (patch)
treef9f6cb22f8f1c2a200397dde893a4bce52cc2f2d
parentresolve partial symbols with use statements (diff)
downloadvim-haredoc-2f0d89f4e111503c0cd8e7bcdaaa8f93e7aef8dc.tar.gz
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.
-rw-r--r--plugin/haredoc.vim6
1 files 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,
\ #{