clipboard: do not close stderr together with stdout (fixup #11617)

stderr is needed to get error messages in case of failure, and
job handler expects it to be open.
This commit is contained in:
Björn Linse 2020-01-02 17:37:39 +01:00
parent cbc8d72fde
commit 6e3793bf11

View File

@ -172,10 +172,9 @@ function! s:clipboard.set(lines, regtype, reg) abort
if jobid > 0
call jobsend(jobid, a:lines)
call jobclose(jobid, 'stdin')
" xclip does not close stdout,stderr when receiving input via stdin
" xclip does not close stdout when receiving input via stdin
if argv[0] ==# 'xclip'
call jobclose(jobid, 'stdout')
call jobclose(jobid, 'stderr')
endif
let selection.owner = jobid
let ret = 1