Skip to content

Commit 1837751

Browse files
committed
fix(paste): allow pasting into empty root directory
assign main explorer when node name is `..` to allow pasting into the root directory when its empty. Fixes #1736
1 parent 059e4ca commit 1837751

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/nvim-tree/actions/fs/copy-paste.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ end
145145
local function do_paste(node, action_type, action_fn)
146146
node = lib.get_last_group_node(node)
147147
if node.name == ".." then
148-
node = node.parent or core.get_explorer()
148+
node = core.get_explorer()
149149
end
150150
local clip = clipboard[action_type]
151151
if #clip == 0 then

0 commit comments

Comments
 (0)