Fix exit callback

Vim provides 2 arguments to the exit handler whereas Neovim always provides 3.
Change function signature to handle an optional third argument, even if it never
gets used.

Fixes #204.
This commit is contained in:
Marco Hinz 2017-01-22 20:42:13 +01:00
parent 8f3fc1c023
commit faf5240823
No known key found for this signature in database
GPG Key ID: 1C980A1B657B4A4F

View File

@ -37,7 +37,7 @@ function! s:callback_stdout_vim(_job_id, data) dict abort
endfunction
" Function: s:callback_exit {{{1
function! s:callback_exit(job_id, exitval) dict abort
function! s:callback_exit(job_id, exitval, ...) dict abort
call sy#verbose('callback_exit()', self.vcs)
call win_gotoid(self.winid)
call sy#repo#get_diff_{self.vcs}(a:exitval, self.stdoutbuf, self.do_register)