nerdtree

A tree explorer plugin for vim.
Index Commits Files Refs
commit 8aafa66eac46eb1a4fb5a3e147cab98f0ddcc248
parent f2ce7390b8aeb9c95b78dc14f158278b278fd0ed
Author: Martin Grenfell <martin_grenfell@msn.com>
Date:   Sat, 10 May 2008 15:33:11 +1200

handle trailing slashes inside oPath#Rename

previously the RenameCurrent() view function was removing trailing
slashes from the destination path before passing it to oPath, now oPath
handles the slashes

Diffstat:
Mplugin/NERD_tree.vim | 5++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim
@@ -308,7 +308,8 @@ endfunction
 "FUNCTION: oTreeFileNode.Rename {{{3 
 "Calls the rename method for this nodes path obj 
 function! s:oTreeFileNode.Rename(newName) dict
-    call self.path.Rename(a:newName)
+    let newName = substitute(a:newName, '\(\\\|\/\)$', '', '')
+    call self.path.Rename(newName)
     call self.parent.RemoveChild(self)
 
     let parentPath = self.path.GetPathTrunk()
@@ -2843,8 +2844,6 @@ function! s:RenameCurrent()
         return
     endif
 
-    let newNodePath = substitute(newNodePath, '\/$', '', '')
-
     try
         let bufnum = bufnr(curNode.path.Str(0))