Skip to content

Commit 49faf10

Browse files
committed
Merge pull request #434 from hattya/Prelude/globpath
Prelude: improve globpath()
2 parents 2a3c6ee + 2c1f330 commit 49faf10

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

autoload/vital/__vital__/Prelude.vim

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,16 @@ else
1212
endfunction
1313
endif
1414

15-
function! s:globpath(path, expr) abort
16-
let R = globpath(a:path, a:expr, 1)
17-
return split(R, '\n')
18-
endfunction
15+
if v:version > 704 ||
16+
\ (v:version == 704 && has('patch279'))
17+
function! s:globpath(path, expr) abort
18+
return globpath(a:path, a:expr, 1, 1)
19+
endfunction
20+
else
21+
function! s:globpath(path, expr) abort
22+
return split(globpath(a:path, a:expr, 1), '\n')
23+
endfunction
24+
endif
1925

2026
" Wrapper functions for type().
2127
let [

0 commit comments

Comments
 (0)