This commit is contained in:
Karl Yngve Lervåg 2016-12-02 12:31:46 +01:00
parent 53b4a454ec
commit 305eb16133

View File

@ -29,6 +29,7 @@ endfunction
" Define tex and aux parsers " Define tex and aux parsers
" "
function! vimtex#parser#tex(file, ...) " {{{1 function! vimtex#parser#tex(file, ...) " {{{1
let s:prev_parsed = ''
return s:parser(a:file, extend({ return s:parser(a:file, extend({
\ 'detailed' : 1, \ 'detailed' : 1,
\ 'input_re' : s:input_line_tex, \ 'input_re' : s:input_line_tex,
@ -39,6 +40,7 @@ endfunction
" }}}1 " }}}1
function! vimtex#parser#aux(file, ...) " {{{1 function! vimtex#parser#aux(file, ...) " {{{1
let s:prev_parsed = ''
return s:parser(a:file, extend({ return s:parser(a:file, extend({
\ 'detailed' : 0, \ 'detailed' : 0,
\ 'input_re' : s:input_line_aux, \ 'input_re' : s:input_line_aux,
@ -78,9 +80,10 @@ endfunction
" Define the main parser function " Define the main parser function
" "
function! s:parser(file, opts) " {{{1 function! s:parser(file, opts) " {{{1
if !filereadable(a:file) if !filereadable(a:file) || s:prev_parsed ==# a:file
return [] return []
endif endif
let s:prev_parsed = a:file
let l:parsed = [] let l:parsed = []
let l:lnum = 0 let l:lnum = 0