Proper handling of bib file paths (fixed #14)

This commit is contained in:
Karl Yngve Lervåg 2014-05-15 20:46:31 +02:00
parent 9be217e188
commit e16960ee25

View File

@ -228,12 +228,10 @@ function! s:bibtex_find_bibs(...)
let bibsearch = '''\v\C\\'
let bibsearch .= '(bibliography|add(bibresource|globalbib|sectionbib))'
let bibsearch .= '\m\s*{\zs[^}]\+\ze}'''
let file_root = fnamemodify(file, ':p:h') . '/'
for entry in map(filter(copy(lines),
\ 'v:val =~ ' . bibsearch),
\ 'matchstr(v:val, ' . bibsearch . ')')
let bibdata_list += map(split(entry, ','), 'file_root . '
\ . 'fnamemodify(v:val, '':r'')')
let bibdata_list += map(split(entry, ','), 'fnamemodify(v:val, '':p:r'')')
endfor
if g:latex_complete_recursive_bib