diff options
author | w0rp <devw0rp@gmail.com> | 2017-05-12 20:38:52 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-05-12 20:38:52 +0100 |
commit | 2bafdb7e5a5cb96cb8263ed1b7bb79be021e4350 (patch) | |
tree | 022bac7040c99d8d6096ee7086d98ac442df21d1 /autoload | |
parent | 07b2542c0d6505f2a843e700d246367a522ecf64 (diff) | |
download | ale-2bafdb7e5a5cb96cb8263ed1b7bb79be021e4350.zip |
Run all tests in NeoVim, improve the test script, and make all tests pass for NeoVim
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/ale/engine.vim | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/autoload/ale/engine.vim b/autoload/ale/engine.vim index 486bdd4f..d431088a 100644 --- a/autoload/ale/engine.vim +++ b/autoload/ale/engine.vim @@ -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 |