Skip to content

Commit 16268c9

Browse files
committed
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.
1 parent 3e44d4e commit 16268c9

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

plugin/NERD_tree.vim

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1618,7 +1618,13 @@ function! s:TreeDirNode._initChildren(silent)
16181618
"get an array of all the files in the nodes dir
16191619
let dir = self.path
16201620
let globDir = dir.str({'format': 'Glob'})
1621-
let filesStr = globpath(globDir, '*',1) . "\n" . globpath(globDir, '.*',1)
1621+
1622+
if version >= 703
1623+
let filesStr = globpath(globDir, '*', 1) . "\n" . globpath(globDir, '.*', 1)
1624+
else
1625+
let filesStr = globpath(globDir, '*') . "\n" . globpath(globDir, '.*')
1626+
endif
1627+
16221628
let files = split(filesStr, "\n")
16231629

16241630
if !a:silent && len(files) > g:NERDTreeNotificationThreshold

0 commit comments

Comments
 (0)