mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-08 19:33:50 -05:00
Merge pull request #675 from jason0x43/relative-paths
Use relative path with globpath
This commit is contained in:
@@ -272,7 +272,9 @@ function! s:TreeDirNode._initChildren(silent)
|
|||||||
|
|
||||||
"get an array of all the files in the nodes dir
|
"get an array of all the files in the nodes dir
|
||||||
let dir = self.path
|
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
|
if version >= 703
|
||||||
let filesStr = globpath(globDir, '*', !g:NERDTreeRespectWildIgnore) . "\n" . globpath(globDir, '.*', !g:NERDTreeRespectWildIgnore)
|
let filesStr = globpath(globDir, '*', !g:NERDTreeRespectWildIgnore) . "\n" . globpath(globDir, '.*', !g:NERDTreeRespectWildIgnore)
|
||||||
@@ -445,7 +447,7 @@ function! s:TreeDirNode.refresh()
|
|||||||
let newChildNodes = []
|
let newChildNodes = []
|
||||||
let invalidFilesFound = 0
|
let invalidFilesFound = 0
|
||||||
let dir = self.path
|
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 filesStr = globpath(globDir, '*') . "\n" . globpath(globDir, '.*')
|
||||||
let files = split(filesStr, "\n")
|
let files = split(filesStr, "\n")
|
||||||
for i in files
|
for i in files
|
||||||
|
|||||||
Reference in New Issue
Block a user