From 1d578f7e5e51e54548ea1ce1a3fa5508bd631d9d Mon Sep 17 00:00:00 2001 From: DarkWiiPlayer Date: Wed, 9 Jun 2021 10:35:35 +0200 Subject: [PATCH] Add nvim check for Async function --- vim/plugin/shame.vim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vim/plugin/shame.vim b/vim/plugin/shame.vim index 6a0f36c..5317c6f 100644 --- a/vim/plugin/shame.vim +++ b/vim/plugin/shame.vim @@ -132,7 +132,11 @@ end " Runs a sequence of commands asynchronously function! Async(array, ...) if len(a:array) > 0 - call job_start(a:array[0], {"out_io": "null", "in_io": "null", "err_io": "null", "exit_cb": function("Async", [a:array[1:-1]])}) + 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