Fix symlink base again

pull/649/head
Arijit Basu 11 months ago
parent ba26752f6c
commit d282032b3d
No known key found for this signature in database
GPG Key ID: 0F8EF5258DC38077

@ -2915,8 +2915,7 @@ end
xplr.fn.builtin.fmt_general_selection_item = function(n) xplr.fn.builtin.fmt_general_selection_item = function(n)
local nl = xplr.util.paint("\\n", { add_modifiers = { "Italic", "Dim" } }) local nl = xplr.util.paint("\\n", { add_modifiers = { "Italic", "Dim" } })
local sh_config = local sh_config = { with_prefix_dots = true, without_suffix_dots = true }
{ base = n.parent, with_prefix_dots = true, without_suffix_dots = true }
local shortened = xplr.util.shorten(n.absolute_path, sh_config) local shortened = xplr.util.shorten(n.absolute_path, sh_config)
if n.is_dir then if n.is_dir then
shortened = shortened .. "/" shortened = shortened .. "/"
@ -2968,7 +2967,8 @@ xplr.fn.builtin.fmt_general_table_row_cols_1 = function(m)
if m.is_broken then if m.is_broken then
r = r .. "×" r = r .. "×"
else else
local symlink_path = xplr.util.shorten(m.symlink.absolute_path) local symlink_path =
xplr.util.shorten(m.symlink.absolute_path, { base = m.parent })
if m.symlink.is_dir then if m.symlink.is_dir then
symlink_path = symlink_path .. "/" symlink_path = symlink_path .. "/"
end end

Loading…
Cancel
Save