async: catch error when jobstart() fails

closes #1692
This commit is contained in:
Christian Brabandt 2018-03-20 14:01:46 +01:00
parent e72a7e2c8d
commit d2ac3d5755
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09

View File

@ -242,7 +242,12 @@ function! airline#async#nvim_vcs_untracked(cfg, file, vcs)
" still running " still running
return return
endif endif
try
let id = jobstart(cmd, config) let id = jobstart(cmd, config)
catch
" catch-all, jobstart() failed, fall back to system()
let id=-1
endtry
let s:untracked_jobs[a:file] = id let s:untracked_jobs[a:file] = id
endif endif
" vim without job feature or nvim jobstart failed " vim without job feature or nvim jobstart failed