diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-12-01 18:50:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-01 18:50:26 +0100 |
commit | 799d9c32157c841c3b8d355fa98a5ace435eef07 (patch) | |
tree | 0b7fe27ba1577e3dd5179447a41b1fc4980f05fd | |
parent | 715fdfee1ed567290639e6d55a1a903811f9e2e6 (diff) | |
download | rneovim-799d9c32157c841c3b8d355fa98a5ace435eef07.tar.gz rneovim-799d9c32157c841c3b8d355fa98a5ace435eef07.tar.bz2 rneovim-799d9c32157c841c3b8d355fa98a5ace435eef07.zip |
clipboard: Prefer xclip (#9302)
The order was swapped in #4150 to prefer `xsel` but there wasn't a clear
explanation. Meanwhile, `xsel` has been neglected upstream.
Let's trying preferring `xclip` again, we've had a few reports of
problems with `xsel`.
closes #7237
ref #5853
ref #7449
-rw-r--r-- | runtime/autoload/provider/clipboard.vim | 12 | ||||
-rw-r--r-- | runtime/doc/provider.txt | 5 |
2 files changed, 9 insertions, 8 deletions
diff --git a/runtime/autoload/provider/clipboard.vim b/runtime/autoload/provider/clipboard.vim index 0c65198d78..0ddfdf7e49 100644 --- a/runtime/autoload/provider/clipboard.vim +++ b/runtime/autoload/provider/clipboard.vim @@ -77,18 +77,18 @@ function! provider#clipboard#Executable() abort let s:copy['*'] = 'wl-copy --foreground --primary' let s:paste['*'] = 'wl-paste --no-newline --primary' return 'wl-copy' - elseif exists('$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' - let s:paste['*'] = 'xsel -o -p' - return 'xsel' elseif exists('$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') + let s:copy['+'] = 'xsel --nodetach -i -b' + let s:paste['+'] = 'xsel -o -b' + let s:copy['*'] = 'xsel --nodetach -i -p' + let s:paste['*'] = 'xsel -o -p' + return 'xsel' elseif executable('lemonade') let s:copy['+'] = 'lemonade copy' let s:paste['+'] = 'lemonade paste' diff --git a/runtime/doc/provider.txt b/runtime/doc/provider.txt index 058e0546cd..4de411a60e 100644 --- a/runtime/doc/provider.txt +++ b/runtime/doc/provider.txt @@ -150,9 +150,10 @@ The presence of a working clipboard tool implicitly enables the '+' and '*' registers. Nvim looks for these clipboard tools, in order of priority: - |g:clipboard| - - pbcopy/pbpaste (macOS) - - xsel (if $DISPLAY is set) + - pbcopy, pbpaste (macOS) + - wl-copy, wl-paste (if $WAYLAND_DISPLAY is set) - xclip (if $DISPLAY is set) + - xsel (if $DISPLAY is set) - lemonade (for SSH) https://github.com/pocke/lemonade - doitclient (for SSH) http://www.chiark.greenend.org.uk/~sgtatham/doit/ - win32yank (Windows) |