diff options
author | ainola <42895189+ainola@users.noreply.github.com> | 2018-11-13 11:01:37 -0700 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2018-11-13 19:01:37 +0100 |
commit | 05f9c7c2f7f52a5b4b1a72a49dab99dc21195c7d (patch) | |
tree | ccf0265c9e95f32df28ebcbde495863c94993c87 | |
parent | 4cc28673eeed9c100e3819bac3af19a0ebcc4879 (diff) | |
download | rneovim-05f9c7c2f7f52a5b4b1a72a49dab99dc21195c7d.tar.gz rneovim-05f9c7c2f7f52a5b4b1a72a49dab99dc21195c7d.tar.bz2 rneovim-05f9c7c2f7f52a5b4b1a72a49dab99dc21195c7d.zip |
clipboard: support Wayland (#9230)
Fixes #9213
-rw-r--r-- | runtime/autoload/provider/clipboard.vim | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/runtime/autoload/provider/clipboard.vim b/runtime/autoload/provider/clipboard.vim index 87a0315073..b763d28570 100644 --- a/runtime/autoload/provider/clipboard.vim +++ b/runtime/autoload/provider/clipboard.vim @@ -71,6 +71,12 @@ 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') + let s:copy['+'] = 'wl-copy --foreground' + let s:paste['+'] = 'wl-paste --no-newline' + 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' |