clipboard: suppression exit warning if exit code is >= 128

This is a matching change to 939d9053bd

Fixes: 7054
This commit is contained in:
Kai Ting
2023-04-28 09:22:36 -07:00
committed by GitHub
parent 4720f4379a
commit 62b5d66e43

View File

@@ -25,7 +25,8 @@ function! s:selection.on_exit(jobid, data, event) abort
if self.owner == a:jobid if self.owner == a:jobid
let self.owner = 0 let self.owner = 0
endif 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 echohl WarningMsg
echomsg 'clipboard: error invoking '.get(self.argv, 0, '?').': '.join(self.stderr) echomsg 'clipboard: error invoking '.get(self.argv, 0, '?').': '.join(self.stderr)
echohl None echohl None