Handle filetype names containing hyphens.
The gentoo vim syntax files use names like gentoo-mirrors, gentoo-metadata, etc. This simple, and very ugly, fix makes it possible to write syntax checkers for them.
This commit is contained in:
parent
3c1a8266eb
commit
0b6587dbb6
@ -139,7 +139,7 @@ function! s:CacheErrors()
|
|||||||
let b:syntastic_loclist = []
|
let b:syntastic_loclist = []
|
||||||
|
|
||||||
if filereadable(expand("%"))
|
if filereadable(expand("%"))
|
||||||
for ft in split(&ft, '\.')
|
for ft in split(substitute(&ft, '-', '_', 'g'), '\.')
|
||||||
if s:Checkable(ft)
|
if s:Checkable(ft)
|
||||||
let b:syntastic_loclist = extend(b:syntastic_loclist, SyntaxCheckers_{ft}_GetLocList())
|
let b:syntastic_loclist = extend(b:syntastic_loclist, SyntaxCheckers_{ft}_GetLocList())
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user