Fixed the reload guard

This commit is contained in:
Karl Yngve Lervåg 2016-07-28 14:01:37 +02:00
parent 2479aaa37c
commit c5f8b5d9d3

View File

@ -155,10 +155,9 @@ endfunction
" }}}1 " }}}1
" {{{1 function! vimtex#reload() " {{{1 function! vimtex#reload()
let s:file = expand('<sfile>') let s:file = expand('<sfile>')
if get(s:, 'reload_guard', 1)
if !exists('s:reloading_script')
function! vimtex#reload() function! vimtex#reload()
let s:reloading_script = 1 let s:reload_guard = 0
let l:scripts = [s:file] let l:scripts = [s:file]
\ + map(copy(s:modules), \ + map(copy(s:modules),
@ -178,7 +177,7 @@ if !exists('s:reloading_script')
endif endif
call vimtex#echo#info('reloaded') call vimtex#echo#info('reloaded')
unlet s:reloading_script unlet s:reload_guard
endfunction endfunction
endif endif