commit 0ebc4de0ff93e4edf853b177eb5b1eb898510423
parent cff8c15977bc5b012b64ffa8a802b0b0b1c2a87c
Author: dundargoc <33953936+dundargoc@users.noreply.github.com>
Date: Thu, 28 Mar 2024 21:17:08 +0100
feat: allow opting in to builtin clipboard providers (#28083)
Setting `vim.g.clipboard = false` will use the builtin clipboard
providers.
Closes https://github.com/neovim/neovim/issues/27698.
Co-authored-by: Gregory Anders <greg@gpanders.com>
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/runtime/autoload/provider/clipboard.vim b/runtime/autoload/provider/clipboard.vim
@@ -67,7 +67,8 @@ function! provider#clipboard#Error() abort
endfunction
function! provider#clipboard#Executable() abort
- if exists('g:clipboard')
+ " Setting g:clipboard to v:false explicitly opts-in to using the "builtin" clipboard providers below
+ if exists('g:clipboard') && g:clipboard isnot# v:false
if type({}) isnot# type(g:clipboard)
\ || type({}) isnot# type(get(g:clipboard, 'copy', v:null))
\ || type({}) isnot# type(get(g:clipboard, 'paste', v:null))