File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
autoload/vital/__vital__/System Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -103,20 +103,31 @@ function! s:execute(command, options) abort
103103 endif
104104 let args = args + [command ]
105105
106+ let job_id = -1
106107 if s: is_nvim
107108 let options = {}
108109 let options [' on_stdout' ] = function (' s:inner_out_cb' , [a: options .out_cb])
109110 let options [' on_stderr' ] = function (' s:inner_err_cb' , [a: options .err_cb])
110111 let options [' on_exit' ] = function (' s:inner_exit_cb' , [a: options .exit_cb])
111112
112- call jobstart ([&shell ] + args , options )
113+ let job_id = jobstart ([&shell ] + args , options )
114+
115+ return {
116+ \ ' stop' : function (' jobstop' , [job_id]),
117+ \ }
113118 else
114119 let options = {}
115120 let options [' out_cb' ] = function (' s:inner_out_cb' , [a: options .out_cb])
116121 let options [' err_cb' ] = function (' s:inner_err_cb' , [a: options .err_cb])
117122 let options [' exit_cb' ] = function (' s:inner_exit_cb' , [a: options .exit_cb])
118123
119- call job_start ([&shell ] + args , options )
124+ let job = job_start ([&shell ] + args , options )
125+
126+ return {
127+ \ ' stop' : function (' job_stop' , [job]),
128+ \ }
129+ }
130+
120131 endif
121132endfunction
122133
You can’t perform that action at this time.
0 commit comments