mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-10 12:23:49 -05:00
rename NERDTreeWildIgnore option and refactor the usage of it
Rename it to the more intention revealing NERDTreeRespectWildIgnore. Use it directly in the `globpath()` call rather than surrounding if statement. Its subjective, but I find this clearer. Add an initializer for the option.
This commit is contained in:
@@ -228,8 +228,8 @@ function! s:TreeDirNode._initChildren(silent)
|
||||
let dir = self.path
|
||||
let globDir = dir.str({'format': 'Glob'})
|
||||
|
||||
if version >= 703 && g:NERDTreeWildIgnore
|
||||
let filesStr = globpath(globDir, '*', 1) . "\n" . globpath(globDir, '.*', 1)
|
||||
if version >= 703
|
||||
let filesStr = globpath(globDir, '*', !g:NERDTreeRespectWildIgnore) . "\n" . globpath(globDir, '.*', !g:NERDTreeRespectWildIgnore)
|
||||
else
|
||||
let filesStr = globpath(globDir, '*') . "\n" . globpath(globDir, '.*')
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user