diff --git a/lua/nvim-tree/actions/find-file.lua b/lua/nvim-tree/actions/find-file.lua index c4e8b6bd..42ed17a4 100644 --- a/lua/nvim-tree/actions/find-file.lua +++ b/lua/nvim-tree/actions/find-file.lua @@ -34,6 +34,9 @@ function M.fn(fname) if not node.open then node.open = true tree_altered = true + end + + if #node.nodes == 0 then TreeExplorer:expand(node) end