aboutsummaryrefslogtreecommitdiff
path: root/runtime/autoload/provider/node.vim
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2017-11-30 02:02:55 +0300
committerZyX <kp-pav@yandex.ru>2017-11-30 02:02:55 +0300
commitb588ccddd7f5998ce7d9780463480ca844963859 (patch)
tree78f1e0f58209385aa63e0e25e071a5893635790d /runtime/autoload/provider/node.vim
parentde45ec0146486c49719ff6f6dcceb4914b471c7a (diff)
parent4618c9c43b2fe052332329b347ac10b4b1db94b5 (diff)
downloadrneovim-b588ccddd7f5998ce7d9780463480ca844963859.tar.gz
rneovim-b588ccddd7f5998ce7d9780463480ca844963859.tar.bz2
rneovim-b588ccddd7f5998ce7d9780463480ca844963859.zip
Merge branch 'master' into expression-parser
Diffstat (limited to 'runtime/autoload/provider/node.vim')
-rw-r--r--runtime/autoload/provider/node.vim9
1 files changed, 5 insertions, 4 deletions
diff --git a/runtime/autoload/provider/node.vim b/runtime/autoload/provider/node.vim
index 419dd517cd..b08ad4f316 100644
--- a/runtime/autoload/provider/node.vim
+++ b/runtime/autoload/provider/node.vim
@@ -3,7 +3,7 @@ if exists('g:loaded_node_provider')
endif
let g:loaded_node_provider = 1
-let s:job_opts = {'rpc': v:true, 'stderr_buffered': v:true}
+let s:job_opts = {'rpc': v:true, 'on_stderr': function('provider#stderr_collector')}
function! provider#node#Detect() abort
return has('win32') ? exepath('neovim-node-host.cmd') : exepath('neovim-node-host')
@@ -32,18 +32,19 @@ function! provider#node#Require(host) abort
endif
try
- let job = copy(s:job_opts)
- let channel_id = jobstart(args, job)
+ let channel_id = jobstart(args, s:job_opts)
if rpcrequest(channel_id, 'poll') ==# 'ok'
return channel_id
endif
catch
echomsg v:throwpoint
echomsg v:exception
- for row in job.stderr
+ for row in provider#get_stderr(channel_id)
echomsg row
endfor
endtry
+ finally
+ call provider#clear_stderr(channel_id)
endtry
throw remote#host#LoadErrorForHost(a:host.orig_name, '$NVIM_NODE_LOG_FILE')
endfunction