commit 16268c9c21511ae1d2dcbc306266bb2daab49248
parent 3e44d4ea5c3d8cfa192e66c77afd05629ddc92e6
Author: Joseph Thomson <joseph.thomson@gmail.com>
Date: Mon, 29 Oct 2012 16:30:29 +0000
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.
Diffstat:
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim
@@ -1618,7 +1618,13 @@ 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'})
- 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")
if !a:silent && len(files) > g:NERDTreeNotificationThreshold