File tree 1 file changed +5
-5
lines changed
lua/neo-tree/sources/common
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -20,14 +20,14 @@ local function get_folder_node(state, node)
20
20
if not node then
21
21
node = tree :get_node ()
22
22
end
23
- local use_parent_local = state .config .same_level
24
- local use_parent_global = require (" neo-tree" ).config .window .same_level
23
+ local use_parent_local = state .config .same_level == " sibling "
24
+ local use_parent_global = require (" neo-tree" ).config .window .insert_as == " sibling "
25
25
local use_parent
26
26
local is_open_dir = node .type == " directory" and (node :is_expanded () or node .empty_expanded )
27
27
if not use_parent_global then
28
28
use_parent = use_parent_local
29
29
else
30
- use_parent = use_parent_local ~= false
30
+ use_parent = use_parent_local ~= " child "
31
31
end
32
32
if use_parent and not is_open_dir then
33
33
return tree :get_node (node :get_parent_id ())
@@ -396,9 +396,9 @@ M.paste_from_clipboard = function(state, callback)
396
396
397
397
paste_complete = function (source , destination )
398
398
if callback then
399
- local same_level = require (" neo-tree" ).config .window .same_level
399
+ local insert_as = require (" neo-tree" ).config .window .insert_as
400
400
-- open the folder so the user can see the new files
401
- local node = same_level and state .tree :get_node () or state .tree :get_node (folder )
401
+ local node = insert_as == " sibling " and state .tree :get_node () or state .tree :get_node (folder )
402
402
if not node then
403
403
log .warn (" Could not find node for " .. folder )
404
404
end
You can’t perform that action at this time.
0 commit comments