mirror of
				https://github.com/neovim/neovim.git
				synced 2025-11-04 01:34:25 +00:00 
			
		
		
		
	fix(osc52): use p for primary selection instead of s (#26076)
				
					
				
			Co-authored-by: Gregory Anders <greg@gpanders.com>
This commit is contained in:
		@@ -10,7 +10,7 @@ local function osc52(clipboard, contents)
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
function M.copy(reg)
 | 
			
		||||
  local clipboard = reg == '+' and 'c' or 's'
 | 
			
		||||
  local clipboard = reg == '+' and 'c' or 'p'
 | 
			
		||||
  return function(lines)
 | 
			
		||||
    local s = table.concat(lines, '\n')
 | 
			
		||||
    io.stdout:write(osc52(clipboard, vim.base64.encode(s)))
 | 
			
		||||
@@ -18,7 +18,7 @@ function M.copy(reg)
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
function M.paste(reg)
 | 
			
		||||
  local clipboard = reg == '+' and 'c' or 's'
 | 
			
		||||
  local clipboard = reg == '+' and 'c' or 'p'
 | 
			
		||||
  return function()
 | 
			
		||||
    local contents = nil
 | 
			
		||||
    local id = vim.api.nvim_create_autocmd('TermResponse', {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user