Bug fix: safer checks for deprecated variables.
This commit is contained in:
parent
90b19d188b
commit
59cc80a8f7
@ -19,7 +19,7 @@ if has('reltime')
|
||||
lockvar! g:_SYNTASTIC_START
|
||||
endif
|
||||
|
||||
let g:_SYNTASTIC_VERSION = '3.7.0-225'
|
||||
let g:_SYNTASTIC_VERSION = '3.7.0-226'
|
||||
lockvar g:_SYNTASTIC_VERSION
|
||||
|
||||
" Sanity checks {{{1
|
||||
|
@ -339,7 +339,10 @@ endfunction " }}}2
|
||||
|
||||
" Check for obsolete variable g:syntastic_<filetype>_checker
|
||||
function! g:SyntasticRegistry._checkDeprecation(filetype) abort " {{{2
|
||||
if exists('g:syntastic_' . a:filetype . '_checker') && !exists('g:syntastic_' . a:filetype . '_checkers')
|
||||
if exists('g:syntastic_' . a:filetype . '_checker') &&
|
||||
\ !exists('g:syntastic_' . a:filetype . '_checkers') &&
|
||||
\ type(g:syntastic_{a:filetype}_checker) == type('')
|
||||
|
||||
let g:syntastic_{a:filetype}_checkers = [g:syntastic_{a:filetype}_checker]
|
||||
call syntastic#log#oneTimeWarn('variable g:syntastic_' . a:filetype . '_checker is deprecated')
|
||||
endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user