Skip to content

Commit

Permalink
continuous mode: avoid fsync in writing compilation ouatput (extended…
Browse files Browse the repository at this point in the history
… to all compilers)
  • Loading branch information
Cristiano De Michele committed Mar 9, 2021
1 parent 63af32b commit 4658dd8
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion autoload/vimtex/compiler/arara.vim
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ endfunction
" }}}1
function! s:callback_nvim_output(id, data, event) abort dict " {{{1
if !empty(a:data)
call writefile(filter(a:data, '!empty(v:val)'), self.output, 'a')
call writefile(filter(a:data, '!empty(v:val)'), self.output, 'aS')
endif
endfunction

Expand Down
2 changes: 1 addition & 1 deletion autoload/vimtex/compiler/generic.vim
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ endfunction
" }}}1
function! s:callback_nvim_output(id, data, event) abort dict " {{{1
if !empty(a:data)
call writefile(filter(a:data, '!empty(v:val)'), self.output, 'a')
call writefile(filter(a:data, '!empty(v:val)'), self.output, 'aS')
endif
endfunction

Expand Down
6 changes: 3 additions & 3 deletions autoload/vimtex/compiler/latexmk.vim
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ function! s:compiler_jobs.exec() abort dict " {{{1
let l:options.err_io = 'pipe'
let l:options.out_cb = function('s:callback_continuous_output')
let l:options.err_cb = function('s:callback_continuous_output')
call writefile([], self.output, 'a')
call writefile([], self.output, 'aS')
else
let s:cb_target = self.target_path !=# b:vimtex.tex
\ ? self.target_path : ''
Expand Down Expand Up @@ -550,7 +550,7 @@ function! s:compiler_nvim.exec() abort dict " {{{1

" Initialize output file
try
call writefile([], self.output)
call writefile([], self.output, 'S')
endtry

let self.job = jobstart(l:cmd, l:shell)
Expand Down Expand Up @@ -594,7 +594,7 @@ function! s:callback_nvim_output(id, data, event) abort dict " {{{1
let l:data = split(substitute(join(a:data, 'QQ'), '^QQ\|QQ$', '', ''), 'QQ')

if !empty(l:data) && filewritable(self.output)
call writefile(l:data, self.output, 'a')
call writefile(l:data, self.output, 'aS')
endif

if match(a:data, 'vimtex_compiler_callback_success') != -1
Expand Down
2 changes: 1 addition & 1 deletion autoload/vimtex/compiler/latexrun.vim
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ endfunction
" }}}1
function! s:callback_nvim_output(id, data, event) abort dict " {{{1
if !empty(a:data)
call writefile(filter(a:data, '!empty(v:val)'), self.output, 'a')
call writefile(filter(a:data, '!empty(v:val)'), self.output, 'aS')
endif
endfunction

Expand Down
2 changes: 1 addition & 1 deletion autoload/vimtex/compiler/tectonic.vim
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ endfunction
" }}}1
function! s:callback_nvim_output(id, data, event) abort dict " {{{1
if !empty(a:data)
call writefile(filter(a:data, '!empty(v:val)'), self.output, 'a')
call writefile(filter(a:data, '!empty(v:val)'), self.output, 'aS')
endif
endfunction

Expand Down

0 comments on commit 4658dd8

Please sign in to comment.