mirror of
https://github.com/kristoferssolo/telescope-frecency.nvim.git
synced 2025-10-21 20:10:38 +00:00
show dot-slash relative dir indicator
This commit is contained in:
parent
610febf90c
commit
867f0d714d
@ -39,7 +39,7 @@ local frecency = function(opts)
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- TODO: look into why this gets called so much
|
-- TODO: look into why this gets called so much
|
||||||
local bufnr, buf_is_loaded, filename, hl_filename, display_items
|
local bufnr, buf_is_loaded, filename, hl_filename, display_items, original_filename
|
||||||
|
|
||||||
local make_display = function(entry)
|
local make_display = function(entry)
|
||||||
bufnr = vim.fn.bufnr
|
bufnr = vim.fn.bufnr
|
||||||
@ -55,9 +55,14 @@ local frecency = function(opts)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
original_filename = filename
|
||||||
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)
|
||||||
|
else
|
||||||
|
if filename ~= original_filename then
|
||||||
|
filename = "./" .. filename
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user