mirror of
https://github.com/neovim/neovim.git
synced 2024-09-17 20:58:20 -04:00
fix(clipboard): ignore exit caused by signal #23378
Problem:
If clipboard job exits by signal, the exit code is >=128:
939d9053bd
xclip 0.13 often exits with code 143, which spams unhelpful messages:
clipboard: error invoking xclip: Waiting for selection requests,
Control-C to quit Waiting for selection request number 1
Solution:
Don't show a warning if the clipboard tool exit code is >=128.
Fixes: #7054
This commit is contained in:
parent
047c22a28c
commit
c3de6524a5
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user