From d2ac3d575505c1c31c2b7f5eca0a96203ff4f1e5 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Tue, 20 Mar 2018 14:01:46 +0100 Subject: [PATCH] async: catch error when jobstart() fails closes #1692 --- autoload/airline/async.vim | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/autoload/airline/async.vim b/autoload/airline/async.vim index 9ed3a98..6dd11c5 100644 --- a/autoload/airline/async.vim +++ b/autoload/airline/async.vim @@ -242,7 +242,12 @@ function! airline#async#nvim_vcs_untracked(cfg, file, vcs) " still running return endif + try 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 endif " vim without job feature or nvim jobstart failed