mirror of
				https://github.com/neovim/neovim.git
				synced 2025-11-04 09:44:31 +00:00 
			
		
		
		
	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>
This commit is contained in:
		@@ -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))
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user