diff --git a/autoload/syntastic/util.vim b/autoload/syntastic/util.vim index f5b017ca..ef46bba6 100644 --- a/autoload/syntastic/util.vim +++ b/autoload/syntastic/util.vim @@ -140,8 +140,8 @@ function! syntastic#util#var(name, ...) abort " {{{2 endfunction " }}}2 " Parse a version string. Return an array of version components. -function! syntastic#util#parseVersion(version) abort " {{{2 - return map(split(matchstr( a:version, '\v^\D*\zs\d+(\.\d+)+\ze' ), '\m\.'), 'str2nr(v:val)') +function! syntastic#util#parseVersion(version, ...) abort " {{{2 + return map(split(matchstr( a:version, a:0 ? a:1 : '\v^\D*\zs\d+(\.\d+)+\ze' ), '\m\.'), 'str2nr(v:val)') endfunction " }}}2 " Verify that the 'installed' version is at least the 'required' version. diff --git a/plugin/syntastic.vim b/plugin/syntastic.vim index 038177d3..9d2e1588 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.6.0-67' +let g:_SYNTASTIC_VERSION = '3.6.0-70' lockvar g:_SYNTASTIC_VERSION " Sanity checks {{{1 diff --git a/syntax_checkers/typescript/tsc.vim b/syntax_checkers/typescript/tsc.vim index c469ec2f..8ad2409c 100644 --- a/syntax_checkers/typescript/tsc.vim +++ b/syntax_checkers/typescript/tsc.vim @@ -1,5 +1,5 @@ "============================================================================ -"File: typescript.vim +"File: tsc.vim "Description: TypeScript syntax checker "Maintainer: Bill Casarin "============================================================================ @@ -17,9 +17,26 @@ let s:save_cpo = &cpo set cpo&vim function! SyntaxCheckers_typescript_tsc_GetLocList() dict + if !exists('s:tsc_new') + let s:tsc_new = -1 + try + let tsc_version = filter(split(syntastic#util#system(self.getExecEscaped() . ' --version'), '\n'), 'v:val =~# ''\m\