@@ -63,16 +63,13 @@ endfunction
6363
6464function ! s: compiler_stop (super, ... ) abort dict " {{{1
6565 call call (a: super , a: 000 , self )
66- if has (' nvim' )
67- if has_key (self , ' nvim_detach' )
68- call self .nvim_detach ()
69- unlet self .nvim_detach
70- endif
71- else
72- if has_key (self , ' listener_id' )
73- call listener_remove (self .listener_id)
74- unlet self .listener_id
75- endif
66+
67+ if has (' nvim' ) && has_key (self , ' nvim_detach' )
68+ call self .nvim_detach ()
69+ unlet self .nvim_detach
70+ elseif has_key (self , ' listener_id' )
71+ call listener_remove (self .listener_id)
72+ unlet self .listener_id
7673 endif
7774
7875 autocmd ! vimtex_compiler_texpresso * <buffer>
@@ -90,7 +87,7 @@ function! s:compiler.texpresso_theme() abort dict " {{{1
9087 let l: normal_id = synIDtrans (hlID (' Normal' ))
9188 let l: fg = synIDattr (l: normal_id , ' fg#' )
9289 let l: bg = synIDattr (l: normal_id , ' bg#' )
93-
90+
9491 if l: fg == # ' ' || l: bg == # ' '
9592 return
9693 endif
@@ -139,8 +136,10 @@ function! s:compiler.texpresso_send(...) abort dict " {{{1
139136 " chansend/ch_sendraw can fail transiently before TeXpresso has finished
140137 " opening its stdin pipe. Propagating the exception causes Neovim to close
141138 " the channel, which delivers EOF to TeXpresso and terminates it.
142- call vimtex#log#info (' TeXpresso: dropped message (process still starting): '
143- \ . v: exception )
139+ call vimtex#log#info (
140+ \ ' TeXpresso: dropped message (process still starting): '
141+ \ . v: exception
142+ \)
144143 endtry
145144endfunction
146145" }}}1
@@ -168,8 +167,6 @@ function! s:texpresso_process_message_line(json) abort " {{{1
168167 return
169168 endif
170169
171- " echom l:msg
172-
173170 if l: msg [0 ] == # ' synctex'
174171 let l: path = l: msg [1 ]
175172 let l: lnum = l: msg [2 ]
@@ -191,7 +188,7 @@ function! s:texpresso_process_message_line(json) abort " {{{1
191188 endif
192189 elseif l: msg [0 ] == # ' flush'
193190 else
194- " TODO: handle other types of messages
191+ " Here we can handle other types of messages
195192 endif
196193endfunction
197194
0 commit comments