Skip to content

Commit b7a6d31

Browse files
committed
Fix copy file path
1 parent a87be80 commit b7a6d31

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lua/config/yank.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ function M.setup()
55
smartyank.setup({})
66
vim.api.nvim_create_user_command("CopyFilePath", function()
77
local path = vim.fn.expand("%:p")
8-
vim.fn.setreg("+", path)
8+
local b64 = vim.base64.encode(path)
9+
io.stdout:write(string.format("\027]52;c;%s\a", b64))
910
print("File path copied: " .. path)
1011
end, {})
1112
vim.keymap.set("n", "<leader>cp", ":CopyFilePath<CR>", { silent = true, noremap = true })

0 commit comments

Comments
 (0)