aboutsummaryrefslogtreecommitdiff
path: root/runtime/autoload/provider/clipboard.vim
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/autoload/provider/clipboard.vim')
-rw-r--r--runtime/autoload/provider/clipboard.vim4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/autoload/provider/clipboard.vim b/runtime/autoload/provider/clipboard.vim
index e5a6e4748a..9e2e6046f8 100644
--- a/runtime/autoload/provider/clipboard.vim
+++ b/runtime/autoload/provider/clipboard.vim
@@ -26,7 +26,7 @@ let s:selections = { '*': s:selection, '+': copy(s:selection) }
function! s:try_cmd(cmd, ...) abort
let argv = split(a:cmd, " ")
- let out = a:0 ? systemlist(argv, a:1, 1) : systemlist(argv, [''], 1)
+ let out = systemlist(argv, (a:0 ? a:1 : ['']), 1)
if v:shell_error
if !exists('s:did_error_try_cmd')
echohl WarningMsg
@@ -64,7 +64,7 @@ function! provider#clipboard#Executable() abort
let s:paste = get(g:clipboard, 'paste', { '+': v:null, '*': v:null })
let s:cache_enabled = get(g:clipboard, 'cache_enabled', 0)
return get(g:clipboard, 'name', 'g:clipboard')
- elseif has('mac') && executable('pbcopy')
+ elseif has('mac') && executable('pbcopy') && s:cmd_ok('pbcopy')
let s:copy['+'] = 'pbcopy'
let s:paste['+'] = 'pbpaste'
let s:copy['*'] = s:copy['+']