From 59cc80a8f7f7544a364814622dc62efd00d17ca4 Mon Sep 17 00:00:00 2001 From: LCD 47 Date: Fri, 23 Sep 2016 06:38:02 +0300 Subject: [PATCH] Bug fix: safer checks for deprecated variables. --- plugin/syntastic.vim | 2 +- plugin/syntastic/registry.vim | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/plugin/syntastic.vim b/plugin/syntastic.vim index b882d18b..94b141ac 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-225' +let g:_SYNTASTIC_VERSION = '3.7.0-226' lockvar g:_SYNTASTIC_VERSION " Sanity checks {{{1 diff --git a/plugin/syntastic/registry.vim b/plugin/syntastic/registry.vim index bcfd5c63..a24e283a 100644 --- a/plugin/syntastic/registry.vim +++ b/plugin/syntastic/registry.vim @@ -339,7 +339,10 @@ endfunction " }}}2 " Check for obsolete variable g:syntastic__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