mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-29 23:37:14 +08:00
Run all tests in NeoVim, improve the test script, and make all tests pass for NeoVim
This commit is contained in:
@@ -283,6 +283,10 @@ function! s:HandleExit(job) abort
|
||||
return
|
||||
endif
|
||||
|
||||
if has('nvim') && !empty(l:output) && empty(l:output[-1])
|
||||
call remove(l:output, -1)
|
||||
endif
|
||||
|
||||
if l:next_chain_index < len(get(l:linter, 'command_chain', []))
|
||||
call s:InvokeChain(l:buffer, l:linter, l:next_chain_index, l:output)
|
||||
return
|
||||
@@ -773,6 +777,17 @@ function! ale#engine#WaitForJobs(deadline) abort
|
||||
call extend(l:job_list, l:info.job_list)
|
||||
endfor
|
||||
|
||||
" NeoVim has a built-in API for this, so use that.
|
||||
if has('nvim')
|
||||
let l:nvim_code_list = jobwait(l:job_list, a:deadline)
|
||||
|
||||
if index(l:nvim_code_list, -1) >= 0
|
||||
throw 'Jobs did not complete on time!'
|
||||
endif
|
||||
|
||||
return
|
||||
endif
|
||||
|
||||
let l:should_wait_more = 1
|
||||
|
||||
while l:should_wait_more
|
||||
|
||||
Reference in New Issue
Block a user