Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

Commit

Permalink
Workaround: make syntastic#util#fname2buf() less broken.
Browse files Browse the repository at this point in the history
  • Loading branch information
lcd047 committed Nov 5, 2017
1 parent 8102624 commit 0e3b6b6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion autoload/syntastic/util.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion plugin/syntastic.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0e3b6b6

Please sign in to comment.