Skip to content

Commit

Permalink
fix: failing check_callback due to file_format
Browse files Browse the repository at this point in the history
refer: #2386
  • Loading branch information
lervag committed May 9, 2022
1 parent 0159fc1 commit 16bb5b7
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions autoload/vimtex/compiler/_template.vim
Original file line number Diff line number Diff line change
Expand Up @@ -452,13 +452,16 @@ endfunction
" }}}1

function! s:check_callback(line) abort " {{{1
if a:line ==# 'vimtex_compiler_callback_compiling'
call vimtex#compiler#callback(1)
elseif a:line ==# 'vimtex_compiler_callback_success'
call vimtex#compiler#callback(2)
elseif a:line ==# 'vimtex_compiler_callback_failure'
call vimtex#compiler#callback(3)
endif
let l:status = get(s:callbacks, substitute(a:line, "\n$", '', ''))
if l:status <= 0 | return | endif

call vimtex#compiler#callback(l:status)
endfunction

let s:callbacks = {
\ 'vimtex_compiler_callback_compiling': 1,
\ 'vimtex_compiler_callback_success': 2,
\ 'vimtex_compiler_callback_failure': 3,
\}

" }}}1

0 comments on commit 16bb5b7

Please sign in to comment.