Skip to content

Commit 2c1f330

Browse files
committed
Prelude: improve globpath()
1 parent 64a8be0 commit 2c1f330

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
@@ -13,10 +13,16 @@ else
1313
endfunction
1414
endif
1515

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

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

0 commit comments

Comments
 (0)