From e357f88de685200570cca6d305aeaacb3b04a540 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Fri, 25 Aug 2017 18:50:15 +0200 Subject: [PATCH] async: define config variable for older vims references #1542 --- autoload/airline/async.vim | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/autoload/airline/async.vim b/autoload/airline/async.vim index 36e37028..1bc298c8 100644 --- a/autoload/airline/async.vim +++ b/autoload/airline/async.vim @@ -215,16 +215,17 @@ endif function! airline#async#nvim_vcs_untracked(cfg, file, vcs) let cmd = a:cfg.cmd . shellescape(a:file) let id = -1 + let config = { + \ 'buf': '', + \ 'vcs': a:vcs, + \ 'cfg': a:cfg, + \ 'file': a:file, + \ 'cwd': fnamemodify(a:file, ':p:h') + \ } if has("nvim") - let config = { - \ 'buf': '', - \ 'vcs': a:vcs, - \ 'cfg': a:cfg, - \ 'file': a:file, - \ 'cwd': fnamemodify(a:file, ':p:h'), + call extend(config, { \ 'on_stdout': function('s:nvim_untracked_job_handler'), - \ 'on_exit': function('s:nvim_untracked_job_handler') - \ } + \ 'on_exit': function('s:nvim_untracked_job_handler')}) if has_key(s:untracked_jobs, config.file) " still running return