diff options
author | b-r-o-c-k <brockmammen@gmail.com> | 2018-04-14 14:17:51 -0500 |
---|---|---|
committer | b-r-o-c-k <brockmammen@gmail.com> | 2018-04-14 14:17:51 -0500 |
commit | ad999eaa775d7d4b0cacedb30c6ea3a0ee699a6f (patch) | |
tree | 92de2079e80f5f289dd87a54af123cb7d90c3058 /runtime/autoload/provider/ruby.vim | |
parent | 78bc52ea5397c092d01cd08296fe1dc85d998329 (diff) | |
parent | ef4feab0e75be19c5f41d70a001db980b72090f5 (diff) | |
download | rneovim-ad999eaa775d7d4b0cacedb30c6ea3a0ee699a6f.tar.gz rneovim-ad999eaa775d7d4b0cacedb30c6ea3a0ee699a6f.tar.bz2 rneovim-ad999eaa775d7d4b0cacedb30c6ea3a0ee699a6f.zip |
Merge branch 'master' into s-dash-stdin
Diffstat (limited to 'runtime/autoload/provider/ruby.vim')
-rw-r--r-- | runtime/autoload/provider/ruby.vim | 29 |
1 files changed, 3 insertions, 26 deletions
diff --git a/runtime/autoload/provider/ruby.vim b/runtime/autoload/provider/ruby.vim index da73a0dfc0..2fe3817512 100644 --- a/runtime/autoload/provider/ruby.vim +++ b/runtime/autoload/provider/ruby.vim @@ -4,17 +4,6 @@ if exists('g:loaded_ruby_provider') endif let g:loaded_ruby_provider = 1 -let s:stderr = {} -let s:job_opts = {'rpc': v:true} - -function! s:job_opts.on_stderr(chan_id, data, event) - let stderr = get(s:stderr, a:chan_id, ['']) - let last = remove(stderr, -1) - let a:data[0] = last.a:data[0] - call extend(stderr, a:data) - let s:stderr[a:chan_id] = stderr -endfunction - function! provider#ruby#Detect() abort if exists("g:ruby_host_prog") return g:ruby_host_prog @@ -23,7 +12,7 @@ function! provider#ruby#Detect() abort end endfunction -function! provider#ruby#Prog() +function! provider#ruby#Prog() abort return s:prog endfunction @@ -35,22 +24,10 @@ function! provider#ruby#Require(host) abort let prog .= " " . shellescape(plugin.path) endfor - try - let channel_id = jobstart(prog, s:job_opts) - if rpcrequest(channel_id, 'poll') ==# 'ok' - return channel_id - endif - catch - echomsg v:throwpoint - echomsg v:exception - for row in get(s:stderr, channel_id, []) - echomsg row - endfor - endtry - throw remote#host#LoadErrorForHost(a:host.orig_name, '$NVIM_RUBY_LOG_FILE') + return provider#Poll(prog, a:host.orig_name, '$NVIM_RUBY_LOG_FILE') endfunction -function! provider#ruby#Call(method, args) +function! provider#ruby#Call(method, args) abort if s:err != '' echoerr s:err return |