aboutsummaryrefslogtreecommitdiff
path: root/runtime/autoload
diff options
context:
space:
mode:
authorckelsel <ckelsel@hotmail.com>2017-08-30 19:44:19 +0800
committerckelsel <ckelsel@hotmail.com>2017-08-30 19:44:19 +0800
commit9ae353ab44724808a41794589b68c1b4339d572a (patch)
tree7f3091f1b66b1b0eaa240db0186575940c33c86c /runtime/autoload
parent0b6fa3a553da3b83419c48fcbb6fb3ec413598e0 (diff)
parent5566f30006a73c30dfbdeece2e08830826d28aa4 (diff)
downloadrneovim-9ae353ab44724808a41794589b68c1b4339d572a.tar.gz
rneovim-9ae353ab44724808a41794589b68c1b4339d572a.tar.bz2
rneovim-9ae353ab44724808a41794589b68c1b4339d572a.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'runtime/autoload')
-rw-r--r--runtime/autoload/provider.vim6
-rw-r--r--runtime/autoload/provider/clipboard.vim12
2 files changed, 14 insertions, 4 deletions
diff --git a/runtime/autoload/provider.vim b/runtime/autoload/provider.vim
index b46ae12b3c..e6514f5ba8 100644
--- a/runtime/autoload/provider.vim
+++ b/runtime/autoload/provider.vim
@@ -2,7 +2,7 @@
let s:stderr = {}
-function! provider#stderr_collector(chan_id, data, event) dict
+function! provider#stderr_collector(chan_id, data, event)
let stderr = get(s:stderr, a:chan_id, [''])
let stderr[-1] .= a:data[0]
call extend(stderr, a:data[1:])
@@ -10,7 +10,9 @@ function! provider#stderr_collector(chan_id, data, event) dict
endfunction
function! provider#clear_stderr(chan_id)
- silent! call remove(s:stderr, a:chan_id)
+ if has_key(s:stderr, a:chan_id)
+ call remove(s:stderr, a:chan_id)
+ endif
endfunction
function! provider#get_stderr(chan_id)
diff --git a/runtime/autoload/provider/clipboard.vim b/runtime/autoload/provider/clipboard.vim
index 8fe53c495a..6454a01c2a 100644
--- a/runtime/autoload/provider/clipboard.vim
+++ b/runtime/autoload/provider/clipboard.vim
@@ -32,7 +32,7 @@ function! s:try_cmd(cmd, ...) abort
if v:shell_error
if !exists('s:did_error_try_cmd')
echohl WarningMsg
- echomsg "clipboard: error: ".(len(out) ? out[0] : '')
+ echomsg "clipboard: error: ".(len(out) ? out[0] : v:shell_error)
echohl None
let s:did_error_try_cmd = 1
endif
@@ -168,5 +168,13 @@ function! s:clipboard.set(lines, regtype, reg) abort
endfunction
function! provider#clipboard#Call(method, args) abort
- return call(s:clipboard[a:method],a:args,s:clipboard)
+ if get(s:, 'here', v:false) " Clipboard provider must not recurse. #7184
+ return 0
+ endif
+ let s:here = v:true
+ try
+ return call(s:clipboard[a:method],a:args,s:clipboard)
+ finally
+ let s:here = v:false
+ endtry
endfunction