Skip to content

Commit 20f7c94

Browse files
committed
give up checking version when failing to obtain the version
related: #51
1 parent f47fbca commit 20f7c94

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

autoload/clang_format.vim

+4
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@ function! clang_format#is_invalid()
119119

120120
if !exists('s:version')
121121
let v = clang_format#get_version()
122+
if len(v) < 2
123+
" XXX: Give up checking version
124+
return 0
125+
endif
122126
if v[0] < 3 || (v[0] == 3 && v[1] < 4)
123127
return 2
124128
endif

0 commit comments

Comments
 (0)