Merge pull request #24370 from neovim/backport-23378-to-release-0.9

[Backport release-0.9] fix(clipboard): suppression exit warning if exit code is >= 128
This commit is contained in:
zeertzjq 2023-07-16 22:42:57 +08:00 committed by GitHub
commit f0e4d284fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,7 +25,8 @@ function! s:selection.on_exit(jobid, data, event) abort
if self.owner == a:jobid
let self.owner = 0
endif
if a:data != 0
" Don't print if exit code is >= 128 ( exit is 128+SIGNUM if by signal (e.g. 143 on SIGTERM))
if a:data > 0 && a:data < 128
echohl WarningMsg
echomsg 'clipboard: error invoking '.get(self.argv, 0, '?').': '.join(self.stderr)
echohl None