Skip to content

Commit d128161

Browse files
committed
Implement local/global override logic
1 parent e98b125 commit d128161

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

lua/neo-tree/sources/common/commands.lua

+8-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,14 @@ local function get_folder_node(state, node)
2020
if not node then
2121
node = tree:get_node()
2222
end
23-
local use_parent = require("neo-tree").config.window.same_level
23+
local use_parent_local = state.config.same_level
24+
local use_parent_global = require("neo-tree").config.window.same_level
25+
local use_parent
26+
if not use_parent_global then
27+
use_parent = use_parent_local
28+
else
29+
use_parent = use_parent_local ~= false
30+
end
2431
if use_parent then
2532
return tree:get_node(node:get_parent_id())
2633
end

0 commit comments

Comments
 (0)