mirror of
https://github.com/preservim/nerdtree.git
synced 2024-11-22 04:07:03 +08:00
fix: escape directories containing brackets([...]) for globbing (#1359)
This commit is contained in:
parent
ea4833da8a
commit
9184ec05bd
|
@ -278,6 +278,10 @@ function! s:TreeDirNode._glob(pattern, all)
|
|||
else
|
||||
let l:pathSpec = escape(fnamemodify(self.path.str({'format': 'Glob'}), ':.'), ',')
|
||||
|
||||
if nerdtree#runningWindows()
|
||||
let l:pathSpec = substitute(l:pathSpec, "\\[\\(.*\\]\\)", "[[]\\1", "g")
|
||||
endif
|
||||
|
||||
" On Windows, the drive letter may be removed by "fnamemodify()".
|
||||
if nerdtree#runningWindows() && l:pathSpec[0] == nerdtree#slash()
|
||||
let l:pathSpec = self.path.drive . l:pathSpec
|
||||
|
|
Loading…
Reference in New Issue
Block a user