Workaround: make syntastic#util#fname2buf() less broken.
This commit is contained in:
parent
8102624901
commit
0e3b6b6271
@ -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)
|
" this is a best-effort attempt to escape file patterns (cf. :h file-pattern)
|
||||||
" XXX it fails for filenames containing something like \{2,3}
|
" XXX it fails for filenames containing something like \{2,3}
|
||||||
|
let buf = -1
|
||||||
for md in [':~:.', ':~', ':p']
|
for md in [':~:.', ':~', ':p']
|
||||||
|
try
|
||||||
|
" Older versions of Vim can throw E94 here
|
||||||
let buf = bufnr('^' . escape(fnamemodify(a:fname, md), '\*?,{}[') . '$')
|
let buf = bufnr('^' . escape(fnamemodify(a:fname, md), '\*?,{}[') . '$')
|
||||||
|
endtry
|
||||||
if buf != -1
|
if buf != -1
|
||||||
break
|
break
|
||||||
endif
|
endif
|
||||||
|
@ -19,7 +19,7 @@ if has('reltime')
|
|||||||
lockvar! g:_SYNTASTIC_START
|
lockvar! g:_SYNTASTIC_START
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let g:_SYNTASTIC_VERSION = '3.8.0-92'
|
let g:_SYNTASTIC_VERSION = '3.8.0-93'
|
||||||
lockvar g:_SYNTASTIC_VERSION
|
lockvar g:_SYNTASTIC_VERSION
|
||||||
|
|
||||||
" Sanity checks {{{1
|
" Sanity checks {{{1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user