refacto: move toggle help and filter toggles into actions

also fix explorer to properly remove element on update when filter is
applied
This commit is contained in:
kiyan
2022-02-07 20:43:24 +01:00
parent 230a61db91
commit 47ccc2913f
6 changed files with 40 additions and 33 deletions

View File

@@ -37,8 +37,8 @@ function M.reload(node, cwd, status)
local abs = utils.path_join({cwd, name})
t = t or (uv.fs_stat(abs) or {}).type
child_names[abs] = true
if not nodes_by_path[abs] and not eutils.should_ignore(abs) and not eutils.should_ignore_git(abs, status.files) then
child_names[abs] = true
if t == 'directory' and uv.fs_access(abs, 'R') then
table.insert(node.nodes, builders.folder(abs, name, status, node_ignored))
elseif t == 'file' then
@@ -52,6 +52,7 @@ function M.reload(node, cwd, status)
end
end
dump(child_names)
for i, n in ipairs(node.nodes) do
if not child_names[n.absolute_path] then
table.remove(node.nodes, i)