From 30039f13f67f79c0dd67a4e243732206055485b0 Mon Sep 17 00:00:00 2001 From: David Sierra DiazGranados Date: Tue, 23 May 2023 19:35:20 -0500 Subject: [PATCH] Respect 'clipboard' in copy_entry_path Using `vim.v.register`, we can respect the user's desire of copying to the unnamed (or unnamedplus) register or default one. Check `:h v:register` Thanks --- lua/oil/actions.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/oil/actions.lua b/lua/oil/actions.lua index 21b175a..692b491 100644 --- a/lua/oil/actions.lua +++ b/lua/oil/actions.lua @@ -199,7 +199,7 @@ M.copy_entry_path = { if not entry or not dir then return end - vim.fn.setreg("+", dir .. entry.name) + vim.fn.setreg(vim.v.register, dir .. entry.name) end, }