Skip to content

Commit

Permalink
Escape commas in the globpath() function's path argument.
Browse files Browse the repository at this point in the history
If not escaped, commas will cause globpath() to search in multiple
directories, none of which really exist.
  • Loading branch information
PhilRunninger authored and lifecrisis committed Aug 25, 2018
1 parent b8cc044 commit 808f5b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/nerdtree/tree_dir_node.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 808f5b2

Please sign in to comment.