Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes #1144: "E118: Too many arguments for function: <SNR>173_on_exit" #1145

Merged
merged 1 commit into from
Dec 17, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions autoload/go/jobcontrol.vim
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ endfunction
" GOPATH when g:go_autodetect_gopath is enabled. The job is started inside the
" current files folder.
function! s:spawn(bang, desc, args) abort
let job = {
\ 'desc': a:desc,
\ 'bang': a:bang,
let job = {
\ 'desc': a:desc,
\ 'bang': a:bang,
\ 'winnr': winnr(),
\ 'importpath': go#package#ImportPath(expand('%:p:h')),
\ 'state': "RUNNING",
Expand Down Expand Up @@ -90,7 +90,7 @@ endfunction
" references and also displaying errors in the quickfix window collected by
" on_stderr handler. If there are no errors and a quickfix window is open,
" it'll be closed.
function! s:on_exit(job_id, exit_status) abort
function! s:on_exit(job_id, exit_status, event) dict abort
let std_combined = self.stderr + self.stdout

let cd = exists('*haslocaldir') && haslocaldir() ? 'lcd ' : 'cd '
Expand Down Expand Up @@ -147,14 +147,14 @@ function! s:callback_handlers_on_exit(job, exit_status, data) abort
endfunction

" on_stdout is the stdout handler for jobstart(). It collects the output of
" stderr and stores them to the jobs internal stdout list.
function! s:on_stdout(job_id, data) abort
" stderr and stores them to the jobs internal stdout list.
function! s:on_stdout(job_id, data) dict abort
call extend(self.stdout, a:data)
endfunction

" on_stderr is the stderr handler for jobstart(). It collects the output of
" stderr and stores them to the jobs internal stderr list.
function! s:on_stderr(job_id, data) abort
function! s:on_stderr(job_id, data) dict abort
call extend(self.stderr, a:data)
endfunction

Expand Down
10 changes: 5 additions & 5 deletions autoload/go/term.vim
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function! go#term#newmode(bang, cmd, mode) abort
setlocal noswapfile
setlocal nobuflisted

let job = {
let job = {
\ 'stderr' : [],
\ 'stdout' : [],
\ 'bang' : a:bang,
Expand Down Expand Up @@ -75,7 +75,7 @@ function! go#term#newmode(bang, cmd, mode) abort
return id
endfunction

function! s:on_stdout(job_id, data) abort
function! s:on_stdout(job_id, data, event) dict abort
if !has_key(s:jobs, a:job_id)
return
endif
Expand All @@ -84,7 +84,7 @@ function! s:on_stdout(job_id, data) abort
call extend(job.stdout, a:data)
endfunction

function! s:on_stderr(job_id, data) abort
function! s:on_stderr(job_id, data, event) dict abort
if !has_key(s:jobs, a:job_id)
return
endif
Expand All @@ -93,7 +93,7 @@ function! s:on_stderr(job_id, data) abort
call extend(job.stderr, a:data)
endfunction

function! s:on_exit(job_id, exit_status) abort
function! s:on_exit(job_id, exit_status, event) dict abort
if !has_key(s:jobs, a:job_id)
return
endif
Expand All @@ -114,7 +114,7 @@ function! s:on_exit(job_id, exit_status) abort

if !empty(errors)
" close terminal we don't need it anymore
close
close

call go#list#Populate(l:listtype, errors, job.cmd)
call go#list#Window(l:listtype, len(errors))
Expand Down