nerdtree

A tree explorer plugin for vim.
Index Commits Files Refs
commit 5bd641834d13c98352811fc4dad1cbafbb252afc
parent 2fbd578a77b67b89baee6c76953ffcf4911032a0
Author: Andrew Radev <andrey.radev@gmail.com>
Date:   Fri,  8 Jul 2011 22:10:13 +0300

Fix for copying error

When copying a node to a directory that's outside the current path, the
"parent" node doesn't really exist, so the code raised an error.

Diffstat:
Mplugin/NERD_tree.vim | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim
@@ -866,8 +866,10 @@ function! s:TreeFileNode.copy(dest)
     let parent = b:NERDTreeRoot.findNode(newPath.getParent())
     if !empty(parent)
         call parent.refresh()
+        return parent.findNode(newPath)
+    else
+        return {}
     endif
-    return parent.findNode(newPath)
 endfunction
 
 "FUNCTION: TreeFileNode.delete {{{3