diff --git a/plugin/syntastic.vim b/plugin/syntastic.vim index 971eca39..cdcceca6 100644 --- a/plugin/syntastic.vim +++ b/plugin/syntastic.vim @@ -19,7 +19,7 @@ if has('reltime') lockvar! g:_SYNTASTIC_START endif -let g:_SYNTASTIC_VERSION = '3.7.0-239' +let g:_SYNTASTIC_VERSION = '3.7.0-242' lockvar g:_SYNTASTIC_VERSION " Sanity checks {{{1 diff --git a/plugin/syntastic/registry.vim b/plugin/syntastic/registry.vim index 5ab6f2c7..62a5b502 100644 --- a/plugin/syntastic/registry.vim +++ b/plugin/syntastic/registry.vim @@ -277,8 +277,8 @@ function! g:SyntasticRegistry.echoInfoFor(ftalias_list) abort " {{{2 else let ft = ft_list[0] let available = self.getNamesOfAvailableCheckers(ft) - let active = map(self.getCheckersAvailable(ft, []), 'v:val.getName()') - let disabled = map(self.getCheckersDisabled(ft, []), 'v:val.getName()') + let active = map(self.getCheckersAvailable(ft, []), 'ft ==# v:val.getFiletype() ? v:val.getName() : v:val.getCName()') + let disabled = map(self.getCheckersDisabled(ft, []), 'ft ==# v:val.getFiletype() ? v:val.getName() : v:val.getCName()') endif let cnt = len(available) @@ -294,7 +294,7 @@ function! g:SyntasticRegistry.echoInfoFor(ftalias_list) abort " {{{2 let cnt = len(disabled) let plural = cnt != 1 ? 's' : '' if len(disabled) - let cklist = join(sort(disabled)) + let cklist = join(sort(disabled, 's:_compare_filetypes')) echomsg 'Checker' . plural . ' disabled for security reasons: ' . cklist endif @@ -414,6 +414,26 @@ function! s:_disabled_by_ycm(filetype) abort " {{{2 return index(s:_YCM_TYPES, a:filetype) >= 0 endfunction " }}}2 +function! s:_compare_filetypes(a, b) abort " {{{2 + if a:a ==# a:b + return 0 + endif + + if stridx(a:a, '/') < 0 + if stridx(a:b, '/') < 0 + return a:a < a:b ? -1 : 1 + else + return -1 + endif + else + if stridx(a:b, '/') < 0 + return 1 + else + return a:a < a:b ? -1 : 1 + endif + endif +endfunction " }}}2 + " }}}1 " vim: set sw=4 sts=4 et fdm=marker: