Fix an inaccurate version check
Calling the function "globpath()" is complex when one is trying to support multiple versions of Vim because this particular function developed rapidly (as did "glob()") during the life of Vim 7.0. This commit makes the version check for calling "globpath()" much clearer. It also allows for rendering dead links in the NERDTree by changing the "globpath()" call for versions of Vim that include patch 7.4.654. This can be done later when the effects are known and the feature is officially requested. Fixes #718.
This commit is contained in:
parent
7ed79c00c1
commit
2b2b35ceda
@ -242,11 +242,13 @@ function! s:TreeDirNode._glob(pattern, all)
|
||||
|
||||
let l:globList = []
|
||||
|
||||
" See ":h version7.txt" for the details of the progression of the "glob()"
|
||||
" and "globpath()" functions.
|
||||
if v:version >= 704
|
||||
" See ":h version7.txt" and ":h version8.txt" for details on the
|
||||
" development of the "glob()" and "globpath()" functions.
|
||||
if v:version > 704 || (v:version == 704 && has('patch654'))
|
||||
let l:globList = globpath(l:pathSpec, a:pattern, !g:NERDTreeRespectWildIgnore, 1, 0)
|
||||
elseif v:version == 704 && has('patch279')
|
||||
let l:globList = globpath(l:pathSpec, a:pattern, !g:NERDTreeRespectWildIgnore, 1)
|
||||
elseif v:version >= 703
|
||||
elseif v:version > 702 || (v:version == 702 && has('patch051'))
|
||||
let l:globString = globpath(l:pathSpec, a:pattern, !g:NERDTreeRespectWildIgnore)
|
||||
let l:globList = split(l:globString, "\n")
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user