Fix race condition on nvim 0.4

I could have sworn this wasn't necessary on 0.4, which is why I added
the extra clause, but I can consistently reproduce E716 now.

Resolves: https://github.com/tpope/vim-fugitive/issues/1881
This commit is contained in:
Tim Pope
2021-11-02 14:07:58 -04:00
parent 174fd6a39b
commit a6b823b8d0

View File

@@ -263,7 +263,7 @@ function! fugitive#Wait(job_or_jobs, ...) abort
if exists('*jobwait') if exists('*jobwait')
call map(copy(jobs), 'chanclose(v:val, "stdin")') call map(copy(jobs), 'chanclose(v:val, "stdin")')
call jobwait(jobs, timeout_ms) call jobwait(jobs, timeout_ms)
if len(jobs) && has('nvim-0.5') if len(jobs)
sleep 1m sleep 1m
endif endif
else else