Wait for transmit buffer to be empty, before calling ch_close_in

This commit is contained in:
Matteo Landi
2019-08-21 20:43:37 +02:00
committed by Prabir Shrestha
parent ada658f2c8
commit a0f4e4e91c

View File

@@ -212,7 +212,10 @@ function! s:job_send(jobid, data, close_stdin) abort
call s:flush_vim_sendraw(a:jobid, v:null)
endif
if a:close_stdin
call ch_close_in(l:jobinfo.channel)
while len(l:jobinfo.buffer) != 0
sleep 1m
endwhile
call ch_close_in(l:jobinfo.channel)
endif
endif
endfunction