mirror of
https://github.com/mentos1386/dotfiles.git
synced 2024-11-29 10:31:18 +00:00
fix(nvim): osc52 yank
This commit is contained in:
parent
d7cb163dd3
commit
b06f7563b1
1 changed files with 3 additions and 3 deletions
|
@ -52,15 +52,15 @@ require("osc52").setup({
|
||||||
silent = false,
|
silent = false,
|
||||||
tmux_passthrough = true,
|
tmux_passthrough = true,
|
||||||
})
|
})
|
||||||
|
vim.opt.clipboard:append({ "unnamed", "unnamedplus" })
|
||||||
function copy()
|
function copy()
|
||||||
if vim.v.event.operator == "y" and vim.v.event.regname == "+" then
|
if vim.v.event.operator == "y" and vim.v.event.regname == "" then
|
||||||
require("osc52").copy_register("+")
|
require("osc52").copy_register("+")
|
||||||
end
|
end
|
||||||
if vim.v.event.operator == "d" and vim.v.event.regname == "+" then
|
if vim.v.event.operator == "d" and vim.v.event.regname == "" then
|
||||||
require("osc52").copy_register("+")
|
require("osc52").copy_register("+")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("TextYankPost", { callback = copy })
|
vim.api.nvim_create_autocmd("TextYankPost", { callback = copy })
|
||||||
|
|
||||||
-- Misc
|
-- Misc
|
||||||
|
|
Loading…
Reference in a new issue