We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
api.node.open.preview
1 parent 0c9bfe7 commit 7ad1c20Copy full SHA for 7ad1c20
lua/nvim-tree/api.lua
@@ -130,11 +130,13 @@ local function open_or_expand_or_dir_up(mode)
130
end
131
132
local function open_preview(node)
133
- if node.nodes or node.name == ".." then
134
- return
+ if node.name == ".." then
+ require("nvim-tree.actions.root.change-dir").fn ".."
135
+ elseif node.nodes then
136
+ require("nvim-tree.lib").expand_or_collapse(node)
137
+ else
138
+ edit("preview", node)
139
-
- edit("preview", node)
140
141
142
Api.node.open.edit = inject_node(open_or_expand_or_dir_up "edit")
0 commit comments