From 05f9c7c2f7f52a5b4b1a72a49dab99dc21195c7d Mon Sep 17 00:00:00 2001 From: ainola <42895189+ainola@users.noreply.github.com> Date: Tue, 13 Nov 2018 11:01:37 -0700 Subject: clipboard: support Wayland (#9230) Fixes #9213 --- runtime/autoload/provider/clipboard.vim | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'runtime') 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' -- cgit