From faf5240823229c11955c8db5d2978536b954beed Mon Sep 17 00:00:00 2001 From: Marco Hinz Date: Sun, 22 Jan 2017 20:42:13 +0100 Subject: [PATCH] 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. --- autoload/sy/repo.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/sy/repo.vim b/autoload/sy/repo.vim index e6e3dfa..2a54910 100644 --- a/autoload/sy/repo.vim +++ b/autoload/sy/repo.vim @@ -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)