fix(explorer): disable follow for explorer search by default. No longer needed. Link directories may show as files then though, but that's not an issue. See #960

This commit is contained in:
Folke Lemaitre 2025-02-07 06:19:40 +01:00
parent 4a6ed6912e
commit b9a17d82a7
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -259,7 +259,6 @@ function M.search(opts, ctx)
"d", -- include directories
"--path-separator", -- same everywhere
"/",
"--follow", -- always needed to make sure we see symlinked dirs as dirs
}
opts.dirs = { ctx.filter.cwd }
ctx.picker.list:set_target()
@ -295,12 +294,12 @@ function M.search(opts, ctx)
else
item.sort = parent.sort .. "#" .. basename .. " "
end
if basename:sub(1, 1) == "." then
item.hidden = true
end
item.hidden = basename:sub(1, 1) == "."
item.text = item.text:sub(1, #opts.cwd) == opts.cwd and item.text:sub(#opts.cwd + 2) or item.text
local node = Tree:node(item.file)
if node then
item.dir = node.dir
item.type = node.type
item.status = (not node.dir or opts.git_status_open) and node.status or nil
end