Skip to content

Commit e307ad9

Browse files
authored
feat: open node when using search-node action (#1082)
1 parent d60773e commit e307ad9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lua/nvim-tree/actions/search-node.lua

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ function M.fn()
4242

4343
if absolute_input_path == node.absolute_path then
4444
found_something = true
45+
46+
if node.nodes and not node.open then
47+
node.open = true
48+
core.get_explorer():expand(node)
49+
tree_altered = true
50+
end
51+
4552
return index
4653
end
4754

0 commit comments

Comments
 (0)