aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2015-06-09 22:05:52 +0200
committerJustin M. Keyes <justinkz@gmail.com>2015-06-25 19:30:29 -0400
commit3fcfd524226f0d41fa5b4eec870a8a2f9767044d (patch)
tree9d850a5af2391359c5a426424d816ed84ab28160 /runtime
parentd133502e98558b1aace18c8f16453a93245f491e (diff)
downloadrneovim-3fcfd524226f0d41fa5b4eec870a8a2f9767044d.tar.gz
rneovim-3fcfd524226f0d41fa5b4eec870a8a2f9767044d.tar.bz2
rneovim-3fcfd524226f0d41fa5b4eec870a8a2f9767044d.zip
clipboard: avoid redundant error message on `clipboard_get` failure .
Fixes #2712 Helped-By: Michael Reed <m.reed@mykolab.com>
Diffstat (limited to 'runtime')
-rw-r--r--runtime/autoload/provider/clipboard.vim7
1 files changed, 4 insertions, 3 deletions
diff --git a/runtime/autoload/provider/clipboard.vim b/runtime/autoload/provider/clipboard.vim
index d2388e92a8..d20b3a9bf1 100644
--- a/runtime/autoload/provider/clipboard.vim
+++ b/runtime/autoload/provider/clipboard.vim
@@ -22,14 +22,15 @@ function! s:try_cmd(cmd, ...)
let argv = split(a:cmd, " ")
let out = a:0 ? systemlist(argv, a:1, 1) : systemlist(argv, [''], 1)
if v:shell_error
+ echohl WarningMsg
echo "clipboard: error: ".(len(out) ? out[0] : '')
- return ''
+ echohl None
+ return 0
endif
return out
endfunction
let s:cache_enabled = 1
-
if executable('pbcopy')
let s:copy['+'] = 'pbcopy'
let s:paste['+'] = 'pbpaste'
@@ -47,7 +48,7 @@ elseif executable('xsel')
let s:copy['*'] = 'xsel --nodetach -i -p'
let s:paste['*'] = 'xsel -o -p'
else
- echom 'clipboard: No shell command for communicating with the clipboard found.'
+ echom 'clipboard: No clipboard tool available. See :help nvim-clipboard'
finish
endif