fix relative dir

This commit is contained in:
Senghan Bright 2021-01-19 08:07:31 +01:00
parent 84443967fc
commit 610febf90c

View File

@ -54,12 +54,13 @@ local frecency = function(opts)
filename = utils.path_shorten(filename) filename = utils.path_shorten(filename)
end end
filename = path.make_relative(filename, cwd)
filename = path.make_relative(filename, cwd)
if frecency_utils.string_starts(filename, os_home) then if frecency_utils.string_starts(filename, os_home) then
filename = "~/" .. path.make_relative(filename, os_home) filename = "~/" .. path.make_relative(filename, os_home)
end end
display_items = show_scores and {{entry.score, "Directory"}} or {} display_items = show_scores and {{entry.score, "Directory"}} or {}
table.insert(display_items, {filename, hl_filename}) table.insert(display_items, {filename, hl_filename})