From 98a2cd5b18b693a9c100a9bd822c25c8c33e330a Mon Sep 17 00:00:00 2001 From: "Phil Runninger (home)" Date: Mon, 13 Aug 2018 23:01:02 -0400 Subject: [PATCH] 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. --- lib/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 index 30db853f..9d4edee8 100644 --- 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()