From 1de3c22a443f45997c6900ff7772e455810a8bbb Mon Sep 17 00:00:00 2001 From: Steve DeWald Date: Sun, 20 Feb 2011 09:40:34 -0800 Subject: [PATCH] Fixed two bugs affecting adding and copying nodes with escaped chars (e.g. spaces) in the filepath --- nerdtree_plugin/fs_menu.vim | 2 +- plugin/NERD_tree.vim | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nerdtree_plugin/fs_menu.vim b/nerdtree_plugin/fs_menu.vim index 953b961..b41d4b1 100644 --- a/nerdtree_plugin/fs_menu.vim +++ b/nerdtree_plugin/fs_menu.vim @@ -57,7 +57,7 @@ function! NERDTreeAddNode() let newNodeName = input("Add a childnode\n". \ "==========================================================\n". \ "Enter the dir/file name to be created. Dirs end with a '/'\n" . - \ "", curDirNode.path.str({'format': 'Glob'}) . g:NERDTreePath.Slash()) + \ "", curDirNode.path.str() . g:NERDTreePath.Slash()) if newNodeName ==# '' call s:echo("Node Creation Aborted.") diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim index 1d481ac..5e62089 100644 --- a/plugin/NERD_tree.vim +++ b/plugin/NERD_tree.vim @@ -2010,7 +2010,7 @@ function! s:Path.copy(dest) let dest = s:Path.WinToUnixPath(a:dest) - let cmd = g:NERDTreeCopyCmd . " " . self.str() . " " . dest + let cmd = g:NERDTreeCopyCmd . " " . escape(self.str(), s:escape_chars) . " " . escape(dest, s:escape_chars) let success = system(cmd) if success != 0 throw "NERDTree.CopyError: Could not copy ''". self.str() ."'' to: '" . a:dest . "'"