aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/autoload/provider/clipboard.vim19
-rw-r--r--runtime/doc/eval.txt3
2 files changed, 11 insertions, 11 deletions
diff --git a/runtime/autoload/provider/clipboard.vim b/runtime/autoload/provider/clipboard.vim
index 47f4271091..86006497d9 100644
--- a/runtime/autoload/provider/clipboard.vim
+++ b/runtime/autoload/provider/clipboard.vim
@@ -16,6 +16,12 @@ function! s:selection.on_exit(jobid, data, event) abort
endif
endfunction
+function! s:selection.on_stderr(jobid, data, event) abort
+ echohl WarningMsg
+ echomsg 'clipboard: error invoking '.get(self.argv, 0, '?').': '.join(a:data)
+ echohl None
+endfunction
+
let s:selections = { '*': s:selection, '+': copy(s:selection)}
function! s:try_cmd(cmd, ...) abort
@@ -135,24 +141,17 @@ function! s:clipboard.set(lines, regtype, reg) abort
end
let selection.data = [a:lines, a:regtype]
let argv = split(s:copy[a:reg], " ")
+ let selection.argv = argv
let selection.detach = s:cache_enabled
let selection.cwd = "/"
- call extend(selection, {
- \ 'on_stdout': function('s:set_errhandler'),
- \ 'on_stderr': function('s:set_errhandler'),
- \ })
let jobid = jobstart(argv, selection)
if jobid > 0
call jobsend(jobid, a:lines)
call jobclose(jobid, 'stdin')
let selection.owner = jobid
- endif
-endfunction
-
-function! s:set_errhandler(job_id, data, event) abort
- if a:job_id <= 0
+ else
echohl WarningMsg
- echo 'clipboard: error when invoking provider: ' . join(a:data)
+ echomsg 'clipboard: failed to execute: '.(s:copy[a:reg])
echohl None
endif
endfunction
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index cca62f1469..8882043162 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -4273,7 +4273,8 @@ getqflist([{what}]) *getqflist()*
If the optional {what} dictionary argument is supplied, then
returns only the items listed in {what} as a dictionary. The
following string items are supported in {what}:
- nr get information for this quickfix list
+ nr get information for this quickfix list; zero
+ means the current quickfix list
title get the list title
winid get the |window-ID| (if opened)
all all of the above quickfix properties