From cd923df2050c011c0e643079974b74e2fee6e3ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Yngve=20Lerv=C3=A5g?= Date: Wed, 30 Jul 2014 19:10:21 +0200 Subject: [PATCH] Ensure full path names for label input files --- autoload/latex/complete.vim | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/autoload/latex/complete.vim b/autoload/latex/complete.vim index e385626..b8d7f79 100644 --- a/autoload/latex/complete.vim +++ b/autoload/latex/complete.vim @@ -339,12 +339,10 @@ function! s:labels_extract(file) " {{{1 endfunction function! s:labels_extract_inputs(file) " {{{1 - " - " Searches file for \@input{file} entries and returns list of all files. - " let matches = [] + let root = fnamemodify(a:file, ':p:h') . '/' for line in filter(readfile(a:file), 'v:val =~ ''\\@input{''') - call add(matches, matchstr(line, '{\zs.*\ze}')) + call add(matches, root . matchstr(line, '{\zs.*\ze}')) endfor return matches endfunction