Add nvim check for Async function

This commit is contained in:
Talia 2021-06-09 10:35:35 +02:00
parent 5d06f4fbc8
commit 1d578f7e5e

View file

@ -132,8 +132,12 @@ end
" Runs a sequence of commands asynchronously
function! Async(array, ...)
if len(a:array) > 0
if has("nvim")
call jobstart(a:array[0], {"on_exit": function("Async", [a:array[1:-1]])})
else
call job_start(a:array[0], {"out_io": "null", "in_io": "null", "err_io": "null", "exit_cb": function("Async", [a:array[1:-1]])})
end
end
endfun
function! s:make_snippet(name, lines)