fix: add trailing slash to directories on yank_entry (#504)

* feat: add trailing slash on yank_entry

Closes #503

* style: format
This commit is contained in:
Foo-x 2024-10-29 02:55:25 +09:00 committed by GitHub
parent cca1631d5e
commit 42333bb46e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -366,7 +366,11 @@ M.yank_entry = {
if not entry or not dir then
return
end
local path = dir .. entry.name
local name = entry.name
if entry.type == "directory" then
name = name .. "/"
end
local path = dir .. name
if opts.modify then
path = vim.fn.fnamemodify(path, opts.modify)
end