aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago de Arruda <tpadilha84@gmail.com>2015-04-02 11:22:24 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2015-04-02 11:33:48 -0300
commitd487dc1a9a63bb1d6d12658ed7ed24382b55a4b1 (patch)
tree3add498ec3642d79f8bef2e313d5f5ac9f723fb9
parent2b7f460716e5c979817f23ba5d9e33d3ab3c9ca0 (diff)
downloadrneovim-d487dc1a9a63bb1d6d12658ed7ed24382b55a4b1.tar.gz
rneovim-d487dc1a9a63bb1d6d12658ed7ed24382b55a4b1.tar.bz2
rneovim-d487dc1a9a63bb1d6d12658ed7ed24382b55a4b1.zip
eval: Ensure all job callbacks are invoked by `jobwait()`
A call to `event_poll` is required to ensure the exit callback from the last job is invoked.
-rw-r--r--src/nvim/eval.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index dae688eb5a..4ab31985b5 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -10972,6 +10972,9 @@ static void f_jobwait(typval_T *argvars, typval_T *rettv)
}
}
+ // poll to ensure any pending callbacks from the last job are invoked
+ event_poll(0);
+
for (listitem_T *arg = args->lv_first; arg != NULL; arg = arg->li_next) {
Job *job = NULL;
if (arg->li_tv.v_type != VAR_NUMBER