Skip to content

Commit

Permalink
fix: add trailing slash to directories on yank_entry (#504)
Browse files Browse the repository at this point in the history
* feat: add trailing slash on yank_entry

Closes #503

* style: format
  • Loading branch information
Foo-x authored Oct 28, 2024
1 parent cca1631 commit 42333bb
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 42333bb

Please # to comment.