From f4caf598fa002147ae82cd63e301c36c80766482 Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Fri, 25 Aug 2017 16:48:45 +0200 Subject: [PATCH] async: only use nvim functions, when actually using neovim closes #1542 --- autoload/airline/async.vim | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/autoload/airline/async.vim b/autoload/airline/async.vim index b7f95077..36e37028 100644 --- a/autoload/airline/async.vim +++ b/autoload/airline/async.vim @@ -213,19 +213,18 @@ endif " Should work in either Vim pre 8 or Nvim function! airline#async#nvim_vcs_untracked(cfg, file, vcs) - let config = { - \ 'buf': '', - \ 'vcs': a:vcs, - \ 'cfg': a:cfg, - \ 'file': a:file, - \ 'cwd': fnamemodify(a:file, ':p:h'), - \ 'on_stdout': function('s:nvim_untracked_job_handler'), - \ 'on_exit': function('s:nvim_untracked_job_handler') - \ } let cmd = a:cfg.cmd . shellescape(a:file) - if !has("nvim") - let id = -1 - else + let id = -1 + if has("nvim") + let config = { + \ 'buf': '', + \ 'vcs': a:vcs, + \ 'cfg': a:cfg, + \ 'file': a:file, + \ 'cwd': fnamemodify(a:file, ':p:h'), + \ 'on_stdout': 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