fix: shorten path when opening files (#194)
This commit is contained in:
parent
f72b9b2637
commit
6cbc8d725d
1 changed files with 5 additions and 0 deletions
|
|
@ -569,6 +569,11 @@ M.select = function(opts, callback)
|
|||
keepalt = true,
|
||||
emsg_silent = true,
|
||||
}
|
||||
-- If we're editing a file on disk, shorten the path prior to :edit so the
|
||||
-- display name will show up shortened
|
||||
if adapter.name == "files" and not util.parse_url(normalized_url) then
|
||||
normalized_url = require("oil.fs").shorten_path(normalized_url)
|
||||
end
|
||||
local filename = util.escape_filename(normalized_url)
|
||||
|
||||
-- If we're previewing a file that hasn't been opened yet, make sure it gets deleted after we
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue