diff --git a/autoload/syntastic/util.vim b/autoload/syntastic/util.vim index 3f0f70fb..6d0dda6f 100644 --- a/autoload/syntastic/util.vim +++ b/autoload/syntastic/util.vim @@ -307,8 +307,12 @@ function! syntastic#util#fname2buf(fname) abort " {{{2 " this is a best-effort attempt to escape file patterns (cf. :h file-pattern) " XXX it fails for filenames containing something like \{2,3} + let buf = -1 for md in [':~:.', ':~', ':p'] - let buf = bufnr('^' . escape(fnamemodify(a:fname, md), '\*?,{}[') . '$') + try + " Older versions of Vim can throw E94 here + let buf = bufnr('^' . escape(fnamemodify(a:fname, md), '\*?,{}[') . '$') + endtry if buf != -1 break endif diff --git a/plugin/syntastic.vim b/plugin/syntastic.vim index 021e0ff1..db522685 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.8.0-92' +let g:_SYNTASTIC_VERSION = '3.8.0-93' lockvar g:_SYNTASTIC_VERSION " Sanity checks {{{1