(feat): add osc52 support

This commit is contained in:
bumpsoo 2025-04-17 04:26:25 +00:00
parent ff50325ade
commit e08ef74fa4
4 changed files with 43 additions and 1 deletions

View file

@ -0,0 +1,27 @@
return {
'ojroques/vim-oscyank',
config = function()
local valid_registers = {
[''] = true,
['+'] = true,
['*'] = true,
}
local valid_operators = {
['y'] = true,
['d'] = true,
}
vim.api.nvim_create_autocmd('TextYankPost', {
callback = function()
local regname = vim.v.event.regname
local operator = vim.v.event.operator
if valid_registers[regname] and valid_operators[operator] then
vim.fn.OSCYankRegister(regname)
end
end,
})
end
}