mirror of
https://github.com/vim-airline/vim-airline.git
synced 2025-07-01 11:14:54 +02:00
async: only use nvim functions, when actually using neovim
closes #1542
This commit is contained in:
parent
42e5c82d64
commit
f4caf598fa
@ -213,6 +213,9 @@ endif
|
|||||||
|
|
||||||
" Should work in either Vim pre 8 or Nvim
|
" Should work in either Vim pre 8 or Nvim
|
||||||
function! airline#async#nvim_vcs_untracked(cfg, file, vcs)
|
function! airline#async#nvim_vcs_untracked(cfg, file, vcs)
|
||||||
|
let cmd = a:cfg.cmd . shellescape(a:file)
|
||||||
|
let id = -1
|
||||||
|
if has("nvim")
|
||||||
let config = {
|
let config = {
|
||||||
\ 'buf': '',
|
\ 'buf': '',
|
||||||
\ 'vcs': a:vcs,
|
\ 'vcs': a:vcs,
|
||||||
@ -222,10 +225,6 @@ function! airline#async#nvim_vcs_untracked(cfg, file, vcs)
|
|||||||
\ 'on_stdout': function('s:nvim_untracked_job_handler'),
|
\ 'on_stdout': function('s:nvim_untracked_job_handler'),
|
||||||
\ 'on_exit': 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
|
|
||||||
if has_key(s:untracked_jobs, config.file)
|
if has_key(s:untracked_jobs, config.file)
|
||||||
" still running
|
" still running
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user