Skip to content

Commit c08d7e9

Browse files
committed
Merge pull request preservim#79 from AndrewRadev/master
Fix for an error when copying nodes
2 parents 2fbd578 + 5bd6418 commit c08d7e9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

plugin/NERD_tree.vim

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -866,8 +866,10 @@ function! s:TreeFileNode.copy(dest)
866866
let parent = b:NERDTreeRoot.findNode(newPath.getParent())
867867
if !empty(parent)
868868
call parent.refresh()
869+
return parent.findNode(newPath)
870+
else
871+
return {}
869872
endif
870-
return parent.findNode(newPath)
871873
endfunction
872874

873875
"FUNCTION: TreeFileNode.delete {{{3

0 commit comments

Comments
 (0)