mirror of
https://github.com/preservim/nerdtree.git
synced 2024-11-26 10:14:20 +08:00
Merge pull request #675 from jason0x43/relative-paths
Use relative path with globpath
This commit is contained in:
commit
2c3249de68
|
@ -272,7 +272,9 @@ function! s:TreeDirNode._initChildren(silent)
|
|||
|
||||
"get an array of all the files in the nodes dir
|
||||
let dir = self.path
|
||||
let globDir = dir.str({'format': 'Glob'})
|
||||
|
||||
"use a relative globDir so that relative wildignore rules will be obeyed
|
||||
let globDir = fnamemodify(dir.str({'format': 'Glob'}), ':.')
|
||||
|
||||
if version >= 703
|
||||
let filesStr = globpath(globDir, '*', !g:NERDTreeRespectWildIgnore) . "\n" . globpath(globDir, '.*', !g:NERDTreeRespectWildIgnore)
|
||||
|
@ -445,7 +447,7 @@ function! s:TreeDirNode.refresh()
|
|||
let newChildNodes = []
|
||||
let invalidFilesFound = 0
|
||||
let dir = self.path
|
||||
let globDir = dir.str({'format': 'Glob'})
|
||||
let globDir = fnamemodify(dir.str({'format': 'Glob'}), ':.')
|
||||
let filesStr = globpath(globDir, '*') . "\n" . globpath(globDir, '.*')
|
||||
let files = split(filesStr, "\n")
|
||||
for i in files
|
||||
|
|
Loading…
Reference in New Issue
Block a user