mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-05 03:08:13 +00:00
fix(explorer): strip cwd from search text for explorer items
This commit is contained in:
parent
3fd437ccd3
commit
38f392a8ad
1 changed files with 1 additions and 0 deletions
|
@ -296,6 +296,7 @@ function M.search(opts, ctx)
|
|||
if basename:sub(1, 1) == "." then
|
||||
item.hidden = true
|
||||
end
|
||||
item.text = item.text:sub(1, #opts.cwd) == opts.cwd and item.text:sub(#opts.cwd + 2) or item.text
|
||||
local node = Tree:find(item.file)
|
||||
if node then
|
||||
item.status = (not node.dir or opts.git_status_open) and node.status or nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue