File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
lua/neo-tree/sources/common Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -20,15 +20,17 @@ local function get_folder_node(state, node)
2020 if not node then
2121 node = tree :get_node ()
2222 end
23- local use_parent_local = state .config .same_level == " sibling"
24- local use_parent_global = require (" neo-tree" ).config .window .insert_as == " sibling"
23+
24+ local insert_as_local = state .config .insert_as
25+ local insert_as_global = require (" neo-tree" ).config .window .insert_as
2526 local use_parent
26- local is_open_dir = node .type == " directory" and (node :is_expanded () or node .empty_expanded )
27- if not use_parent_global then
28- use_parent = use_parent_local
27+ if insert_as_local then
28+ use_parent = insert_as_local == " sibling"
2929 else
30- use_parent = use_parent_local ~= " child "
30+ use_parent = insert_as_global == " sibling "
3131 end
32+
33+ local is_open_dir = node .type == " directory" and (node :is_expanded () or node .empty_expanded )
3234 if use_parent and not is_open_dir then
3335 return tree :get_node (node :get_parent_id ())
3436 end
You can’t perform that action at this time.
0 commit comments