1
0
mirror of https://github.com/amix/vimrc synced 2025-07-05 23:44:59 +08:00

Updated plugins

This commit is contained in:
Amir
2020-12-04 22:15:32 +01:00
parent e83f5ea2e7
commit a06964dd3b
261 changed files with 6955 additions and 2773 deletions

View File

@ -6,6 +6,8 @@ let s:available = has('nvim') || (
\ )
\ )
let s:jobs = {}
function! gitgutter#async#available()
return s:available
endfunction
@ -28,11 +30,12 @@ function! gitgutter#async#execute(cmd, bufnr, handler) abort
\ 'on_exit': function('s:on_exit_nvim')
\ }))
else
call job_start(command, {
let job = job_start(command, {
\ 'out_cb': function('s:on_stdout_vim', options),
\ 'err_cb': function('s:on_stderr_vim', options),
\ 'close_cb': function('s:on_exit_vim', options)
\ })
let s:jobs[s:job_id(job)] = 1
endif
endfunction
@ -83,6 +86,8 @@ endfunction
function! s:on_exit_vim(channel) dict abort
let job = ch_getjob(a:channel)
let jobid = s:job_id(job)
if has_key(s:jobs, jobid) | unlet s:jobs[jobid] | endif
while 1
if job_status(job) == 'dead'
let exit_code = job_info(job).exitval
@ -95,3 +100,8 @@ function! s:on_exit_vim(channel) dict abort
call self.handler.out(self.buffer, join(self.stdoutbuffer, "\n"))
endif
endfunction
function! s:job_id(job)
" Vim
return job_info(a:job).process
endfunction