From e16960ee25e7d44d2e179bf8952693b2824925e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Yngve=20Lerv=C3=A5g?= Date: Thu, 15 May 2014 20:46:31 +0200 Subject: [PATCH] Proper handling of bib file paths (fixed #14) --- autoload/latex/complete.vim | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/autoload/latex/complete.vim b/autoload/latex/complete.vim index 93853f6..73ed411 100644 --- a/autoload/latex/complete.vim +++ b/autoload/latex/complete.vim @@ -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