Workaround: make syntastic#util#fname2buf() less broken.

This commit is contained in:
LCD 47 2017-11-05 15:56:05 +02:00
parent 8102624901
commit 0e3b6b6271
2 changed files with 6 additions and 2 deletions

View File

@ -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']
try
" Older versions of Vim can throw E94 here
let buf = bufnr('^' . escape(fnamemodify(a:fname, md), '\*?,{}[') . '$')
endtry
if buf != -1
break
endif

View File

@ -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