aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornecabo <fynn.becker@gmx.de>2020-10-30 02:35:20 +0100
committerGitHub <noreply@github.com>2020-10-29 21:35:20 -0400
commit037ffd54dcd8edba6787d93273e6696b7a366ac6 (patch)
tree497bb20719ab6e2b9f19d8987b62c1409b9cf8a4
parentc6ccdda26ae0b8a9bf4d0779d398cb7c9864aedf (diff)
downloadrneovim-037ffd54dcd8edba6787d93273e6696b7a366ac6.tar.gz
rneovim-037ffd54dcd8edba6787d93273e6696b7a366ac6.tar.bz2
rneovim-037ffd54dcd8edba6787d93273e6696b7a366ac6.zip
Fix clipboard provider detection (#13190)
Fixes #13189
-rw-r--r--runtime/autoload/provider/clipboard.vim8
1 files changed, 4 insertions, 4 deletions
diff --git a/runtime/autoload/provider/clipboard.vim b/runtime/autoload/provider/clipboard.vim
index 275d18a5a9..c2195fa02d 100644
--- a/runtime/autoload/provider/clipboard.vim
+++ b/runtime/autoload/provider/clipboard.vim
@@ -91,19 +91,19 @@ function! provider#clipboard#Executable() abort
let s:paste['*'] = s:paste['+']
let s:cache_enabled = 0
return 'pbcopy'
- elseif exists('$WAYLAND_DISPLAY') && executable('wl-copy') && executable('wl-paste')
+ elseif !empty($WAYLAND_DISPLAY) && executable('wl-copy') && executable('wl-paste')
let s:copy['+'] = ['wl-copy', '--foreground', '--type', 'text/plain']
let s:paste['+'] = ['wl-paste', '--no-newline']
let s:copy['*'] = ['wl-copy', '--foreground', '--primary', '--type', 'text/plain']
let s:paste['*'] = ['wl-paste', '--no-newline', '--primary']
return 'wl-copy'
- elseif exists('$DISPLAY') && executable('xclip')
+ elseif !empty($DISPLAY) && executable('xclip')
let s:copy['+'] = ['xclip', '-quiet', '-i', '-selection', 'clipboard']
let s:paste['+'] = ['xclip', '-o', '-selection', 'clipboard']
let s:copy['*'] = ['xclip', '-quiet', '-i', '-selection', 'primary']
let s:paste['*'] = ['xclip', '-o', '-selection', 'primary']
return 'xclip'
- elseif exists('$DISPLAY') && executable('xsel') && s:cmd_ok('xsel -o -b')
+ elseif !empty($DISPLAY) && executable('xsel') && s:cmd_ok('xsel -o -b')
let s:copy['+'] = ['xsel', '--nodetach', '-i', '-b']
let s:paste['+'] = ['xsel', '-o', '-b']
let s:copy['*'] = ['xsel', '--nodetach', '-i', '-p']
@@ -132,7 +132,7 @@ function! provider#clipboard#Executable() abort
let s:copy['*'] = s:copy['+']
let s:paste['*'] = s:paste['+']
return 'win32yank'
- elseif exists('$TMUX') && executable('tmux')
+ elseif !empty($TMUX) && executable('tmux')
let s:copy['+'] = ['tmux', 'load-buffer', '-']
let s:paste['+'] = ['tmux', 'save-buffer', '-']
let s:copy['*'] = s:copy['+']