From b06f7563b17f78ab24826611b5fe0dd222face8e Mon Sep 17 00:00:00 2001 From: Tine Date: Wed, 31 Jan 2024 23:32:03 +0100 Subject: [PATCH] fix(nvim): osc52 yank --- nvim/init.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nvim/init.lua b/nvim/init.lua index ea50436..26c50fd 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -52,15 +52,15 @@ require("osc52").setup({ silent = false, tmux_passthrough = true, }) +vim.opt.clipboard:append({ "unnamed", "unnamedplus" }) 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("+") 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("+") end end - vim.api.nvim_create_autocmd("TextYankPost", { callback = copy }) -- Misc