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:
James Rowe 2011-12-13 17:27:16 +00:00
parent 3c1a8266eb
commit 0b6587dbb6

View File

@ -139,7 +139,7 @@ function! s:CacheErrors()
let b:syntastic_loclist = []
if filereadable(expand("%"))
for ft in split(&ft, '\.')
for ft in split(substitute(&ft, '-', '_', 'g'), '\.')
if s:Checkable(ft)
let b:syntastic_loclist = extend(b:syntastic_loclist, SyntaxCheckers_{ft}_GetLocList())
endif