diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2024-03-28 21:17:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-28 15:17:08 -0500 |
commit | 0ebc4de0ff93e4edf853b177eb5b1eb898510423 (patch) | |
tree | d8c07b7bbab25a2106f6175338f16aebd6cf3712 | |
parent | cff8c15977bc5b012b64ffa8a802b0b0b1c2a87c (diff) | |
download | rneovim-0ebc4de0ff93e4edf853b177eb5b1eb898510423.tar.gz rneovim-0ebc4de0ff93e4edf853b177eb5b1eb898510423.tar.bz2 rneovim-0ebc4de0ff93e4edf853b177eb5b1eb898510423.zip |
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>
-rw-r--r-- | runtime/autoload/provider/clipboard.vim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/autoload/provider/clipboard.vim b/runtime/autoload/provider/clipboard.vim index 05f6bdb871..82e0953196 100644 --- 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)) |