async: Move function definition so it is valid for nvim
This commit is contained in:
parent
941341d085
commit
a8c96d7c07
@ -53,6 +53,16 @@ function! s:valid_dir(dir)
|
|||||||
return a:dir
|
return a:dir
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
function! airline#async#vcs_untracked(config, file, vcs)
|
||||||
|
if g:airline#init#vim_async
|
||||||
|
" Vim 8 with async support
|
||||||
|
noa call airline#async#vim_vcs_untracked(a:config, a:file)
|
||||||
|
else
|
||||||
|
" nvim async or vim without job-feature
|
||||||
|
noa call airline#async#nvim_vcs_untracked(a:config, a:file, a:vcs)
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
if v:version >= 800 && has("job")
|
if v:version >= 800 && has("job")
|
||||||
" Vim 8.0 with Job feature
|
" Vim 8.0 with Job feature
|
||||||
" TODO: Check if we need the cwd option for the job_start() functions
|
" TODO: Check if we need the cwd option for the job_start() functions
|
||||||
@ -123,16 +133,6 @@ if v:version >= 800 && has("job")
|
|||||||
let s:po_jobs[a:file] = id
|
let s:po_jobs[a:file] = id
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! airline#async#vcs_untracked(config, file, vcs)
|
|
||||||
if g:airline#init#vim_async
|
|
||||||
" Vim 8 with async support
|
|
||||||
noa call airline#async#vim_vcs_untracked(a:config, a:file)
|
|
||||||
else
|
|
||||||
" nvim async or vim without job-feature
|
|
||||||
noa call airline#async#nvim_vcs_untracked(a:config, a:file, a:vcs)
|
|
||||||
endif
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
function! airline#async#vim_vcs_untracked(config, file)
|
function! airline#async#vim_vcs_untracked(config, file)
|
||||||
if g:airline#init#is_windows && &shell =~ 'cmd'
|
if g:airline#init#is_windows && &shell =~ 'cmd'
|
||||||
let cmd = a:config['cmd'] . shellescape(a:file)
|
let cmd = a:config['cmd'] . shellescape(a:file)
|
||||||
|
Loading…
Reference in New Issue
Block a user