Fix a bug with reading from large files. Large files we being truncated by closing the input buffer too early.
This commit is contained in:
parent
facc3a89b4
commit
6a442dae6e
@ -40,6 +40,12 @@ function! s:ClearJob(job)
|
|||||||
if has('nvim')
|
if has('nvim')
|
||||||
call jobstop(a:job)
|
call jobstop(a:job)
|
||||||
else
|
else
|
||||||
|
" We must close the channel for reading the buffer if it is open
|
||||||
|
" when stopping a job. Otherwise, we will get errors in the status line.
|
||||||
|
if ch_status(job_getchannel(a:job)) ==# 'open'
|
||||||
|
call ch_close_in(job_getchannel(a:job))
|
||||||
|
endif
|
||||||
|
|
||||||
call job_stop(a:job)
|
call job_stop(a:job)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -175,8 +181,6 @@ function! s:ApplyLinter(buffer, linter)
|
|||||||
|
|
||||||
" Vim 8 will read the stdin from the file's buffer.
|
" Vim 8 will read the stdin from the file's buffer.
|
||||||
let a:linter.job = job_start(l:command, l:job_options)
|
let a:linter.job = job_start(l:command, l:job_options)
|
||||||
|
|
||||||
call ch_close_in(job_getchannel(a:linter.job))
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let s:job_info_map[a:linter.job] = {
|
let s:job_info_map[a:linter.job] = {
|
||||||
|
Loading…
Reference in New Issue
Block a user