Skip to content

Commit f8ce48f

Browse files
committed
Apply the workaround for #40 only if Vim < 7.4.001
1 parent d6468c9 commit f8ce48f

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

autoload/ghcmod/util.vim

+11-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,17 @@ function! ghcmod#util#print_error(msg) "{{{
1111
endfunction "}}}
1212

1313
if vimproc#util#is_windows() " s:is_abspath {{{
14-
function! ghcmod#util#is_abspath(path)
15-
return a:path =~? '^[A-Za-z]:[\/]'
16-
endfunction
14+
if v:version > 704 || (v:version == 704 && has('patch001'))
15+
function! ghcmod#util#is_abspath(path)
16+
return a:path =~? '^[a-z]:[\/]'
17+
endfunction
18+
else
19+
" NFA regexp engine had a bug and fixed in 7.4.001.
20+
" http://code.google.com/p/vim/source/detail?r=3e9107b86b68d83bfa94e43afffbf17623afe55e
21+
function! ghcmod#util#is_abspath(path)
22+
return a:path =~# '^[A-Za-z]:[\/]'
23+
endfunction
24+
endif
1725
else
1826
function! ghcmod#util#is_abspath(path)
1927
return a:path[0] ==# '/'

0 commit comments

Comments
 (0)