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
This commit is contained in:
David Sierra DiazGranados 2023-05-23 19:35:20 -05:00 committed by GitHub
parent d27bfa1f37
commit 30039f13f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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,
}