Skip to content

Commit

Permalink
fix: regression error
Browse files Browse the repository at this point in the history
refer: #2896
  • Loading branch information
lervag committed Mar 12, 2024
1 parent a77d14b commit a1b7524
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions autoload/vimtex/compiler.vim
Original file line number Diff line number Diff line change
Expand Up @@ -169,14 +169,14 @@ function! vimtex#compiler#compile_selected(type) abort range " {{{1
call l:compiler.wait()

" Check if successful
if vimtex#qf#inquire(l:file.tex)
if vimtex#qf#inquire(l:state.tex)
call vimtex#log#set_silent_restore()
call vimtex#log#warning('Compiling selected lines ... failed!')
botright cwindow
return
else
call l:compiler.clean(0)
call b:vimtex.viewer.view(l:file.pdf)
call b:vimtex.viewer.view(l:state.pdf)
call vimtex#log#set_silent_restore()
call vimtex#log#info('Compiling selected lines ... done')
endif
Expand Down
1 change: 1 addition & 0 deletions autoload/vimtex/parser.vim
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ function! vimtex#parser#selection_to_texfile(opts) range abort " {{{1
let l:file.name = l:opts.name
let l:file.base = l:file.name . '.tex'
let l:file.tex = l:file.root . '/' . l:file.name . '.tex'
let l:file.pdf = l:file.root . '/' . l:file.name . '.pdf'
call writefile(l:lines, l:file.tex)

return l:file
Expand Down

0 comments on commit a1b7524

Please sign in to comment.