nerdtree

A tree explorer plugin for vim.
Index Commits Files Refs
commit 808f5b225b090bb4a94a2c47bb08d1bc1f7f8a4e
parent b8cc0447607e0034912c4e5eba0e7da0e9faa296
Author: Phil Runninger (home) <philrunninger@gmail.com>
Date:   Mon, 13 Aug 2018 23:01:02 -0400

Escape commas in the globpath() function's path argument.

If not escaped, commas will cause globpath() to search in multiple
directories, none of which really exist.

Diffstat:
Mlib/nerdtree/tree_dir_node.vim | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/nerdtree/tree_dir_node.vim b/lib/nerdtree/tree_dir_node.vim
@@ -247,7 +247,7 @@ function! s:TreeDirNode._glob(pattern, all)
     if self.path.str() == getcwd()
         let l:pathSpec = ','
     else
-        let l:pathSpec = fnamemodify(self.path.str({'format': 'Glob'}), ':.')
+        let l:pathSpec = escape(fnamemodify(self.path.str({'format': 'Glob'}), ':.'), ',')
 
         " On Windows, the drive letter may be removed by "fnamemodify()".
         if nerdtree#runningWindows() && l:pathSpec[0] == g:NERDTreePath.Slash()