Skip to content

Commit

Permalink
feat: add trailing slash on yank_entry
Browse files Browse the repository at this point in the history
Closes #503
  • Loading branch information
Foo-x committed Oct 28, 2024
1 parent cca1631 commit ae73e56
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lua/oil/actions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ae73e56

Please sign in to comment.