clipboard/macOS: assume that pbcopy works #9480

Avoids ~30-60 ms startup cost for users of clipboard=unnamed.
This commit is contained in:
Marco Hinz 2019-01-10 09:11:36 +01:00 committed by Justin M. Keyes
parent 6d8b5989bc
commit 3f10c5b533

View File

@ -65,7 +65,7 @@ function! provider#clipboard#Executable() abort
let s:paste = get(g:clipboard, 'paste', { '+': v:null, '*': v:null })
let s:cache_enabled = get(g:clipboard, 'cache_enabled', 0)
return get(g:clipboard, 'name', 'g:clipboard')
elseif has('mac') && executable('pbpaste') && s:cmd_ok('pbpaste')
elseif has('mac')
let s:copy['+'] = 'pbcopy'
let s:paste['+'] = 'pbpaste'
let s:copy['*'] = s:copy['+']