mirror of
https://github.com/kristoferssolo/telescope-frecency.nvim.git
synced 2025-10-21 20:10:38 +00:00
fix relative dir
This commit is contained in:
parent
84443967fc
commit
610febf90c
@ -17,7 +17,7 @@ local frecency_utils = require("telescope._extensions.frecency.util")
|
|||||||
|
|
||||||
local os_home = vim.loop.os_homedir()
|
local os_home = vim.loop.os_homedir()
|
||||||
local os_path_sep = utils.get_separator()
|
local os_path_sep = utils.get_separator()
|
||||||
local show_scores = false
|
local show_scores = false
|
||||||
local db_client
|
local db_client
|
||||||
|
|
||||||
local frecency = function(opts)
|
local frecency = function(opts)
|
||||||
@ -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})
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user