From 305eb161330af05c8a95587796a628b0e62d6d17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Yngve=20Lerv=C3=A5g?= Date: Fri, 2 Dec 2016 12:31:46 +0100 Subject: [PATCH] Fixed #633 --- autoload/vimtex/parser.vim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/autoload/vimtex/parser.vim b/autoload/vimtex/parser.vim index dd237a3..d3a2d1c 100644 --- a/autoload/vimtex/parser.vim +++ b/autoload/vimtex/parser.vim @@ -29,6 +29,7 @@ endfunction " Define tex and aux parsers " function! vimtex#parser#tex(file, ...) " {{{1 + let s:prev_parsed = '' return s:parser(a:file, extend({ \ 'detailed' : 1, \ 'input_re' : s:input_line_tex, @@ -39,6 +40,7 @@ endfunction " }}}1 function! vimtex#parser#aux(file, ...) " {{{1 + let s:prev_parsed = '' return s:parser(a:file, extend({ \ 'detailed' : 0, \ 'input_re' : s:input_line_aux, @@ -78,9 +80,10 @@ endfunction " Define the main parser function " function! s:parser(file, opts) " {{{1 - if !filereadable(a:file) + if !filereadable(a:file) || s:prev_parsed ==# a:file return [] endif + let s:prev_parsed = a:file let l:parsed = [] let l:lnum = 0