Fix call to globpath() for Vim 7.2 and below.

globpath() takes an extra optional parameter in Vim 7.3, but this
breaks NERD tree on earlier versions.
This commit is contained in:
Joseph Thomson 2012-10-29 16:30:29 +00:00
parent 3e44d4ea5c
commit 16268c9c21

View File

@ -1618,7 +1618,13 @@ 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'}) let globDir = dir.str({'format': 'Glob'})
let filesStr = globpath(globDir, '*',1) . "\n" . globpath(globDir, '.*',1)
if version >= 703
let filesStr = globpath(globDir, '*', 1) . "\n" . globpath(globDir, '.*', 1)
else
let filesStr = globpath(globDir, '*') . "\n" . globpath(globDir, '.*')
endif
let files = split(filesStr, "\n") let files = split(filesStr, "\n")
if !a:silent && len(files) > g:NERDTreeNotificationThreshold if !a:silent && len(files) > g:NERDTreeNotificationThreshold