Skip to content

Commit 4c21cf6

Browse files
committed
Change same_level to insert_as
1 parent e289495 commit 4c21cf6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

+5-5
Original file line numberDiff line numberDiff line change
@@ -20,14 +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_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"
2525
local use_parent
2626
local is_open_dir = node.type == "directory" and (node:is_expanded() or node.empty_expanded)
2727
if not use_parent_global then
2828
use_parent = use_parent_local
2929
else
30-
use_parent = use_parent_local ~= false
30+
use_parent = use_parent_local ~= "child"
3131
end
3232
if use_parent and not is_open_dir then
3333
return tree:get_node(node:get_parent_id())
@@ -396,9 +396,9 @@ M.paste_from_clipboard = function(state, callback)
396396

397397
paste_complete = function(source, destination)
398398
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
400400
-- 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)
402402
if not node then
403403
log.warn("Could not find node for " .. folder)
404404
end

0 commit comments

Comments
 (0)