mirror of
https://github.com/hexedtech/codemp-nvim.git
synced 2024-11-22 07:24:52 +01:00
fix(neotree): expand also children
This commit is contained in:
parent
89e3f3e2c7
commit
6a0ba39685
2 changed files with 4 additions and 0 deletions
|
@ -160,6 +160,9 @@ M.update_state = function(state)
|
||||||
renderer.show_nodes(root, state)
|
renderer.show_nodes(root, state)
|
||||||
for _, node in ipairs(state.tree:get_nodes()) do
|
for _, node in ipairs(state.tree:get_nodes()) do
|
||||||
node:expand()
|
node:expand()
|
||||||
|
for _, child_node in ipairs(state.tree:get_nodes(node)) do
|
||||||
|
child_node:expand()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ local function toggle(node)
|
||||||
else
|
else
|
||||||
node:expand()
|
node:expand()
|
||||||
end
|
end
|
||||||
|
manager.refresh("codemp")
|
||||||
end
|
end
|
||||||
|
|
||||||
M.refresh = require("neo-tree.utils").wrap(manager.refresh, "codemp")
|
M.refresh = require("neo-tree.utils").wrap(manager.refresh, "codemp")
|
||||||
|
|
Loading…
Reference in a new issue