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.
This commit is contained in:
Thiago de Arruda 2015-04-02 11:22:24 -03:00
parent 2b7f460716
commit d487dc1a9a

View File

@ -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