aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2017-11-27 13:01:49 +0100
committerBjörn Linse <bjorn.linse@gmail.com>2017-12-23 14:02:00 +0100
commit308dd53783314103710a37c9809eddb78279eab4 (patch)
tree569d813e9efdff03fd43b72da88a7d786ab06d60 /runtime
parentaa951b14893d8a30ec3bad6fb4b7064ccda16d5c (diff)
downloadrneovim-308dd53783314103710a37c9809eddb78279eab4.tar.gz
rneovim-308dd53783314103710a37c9809eddb78279eab4.tar.bz2
rneovim-308dd53783314103710a37c9809eddb78279eab4.zip
channel: check for existance before trying to set key
This avoids an error message in async context, where it is not safe.
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/channel.txt8
1 files changed, 6 insertions, 2 deletions
diff --git a/runtime/doc/channel.txt b/runtime/doc/channel.txt
index c94c64eb84..c4f7eb1ff1 100644
--- a/runtime/doc/channel.txt
+++ b/runtime/doc/channel.txt
@@ -43,7 +43,7 @@ bytes. Additionally, for a job channel using rpc, bytes can still be
read over its stderr. Similarily, only bytes can be written to nvim's own stderr.
*channel-callback* *buffered*
- *on_stdout* *on_stderr* *on_stdin* *on_data*
+ *E5210* *on_stdout* *on_stderr* *on_stdin* *on_data*
A callback function `on_{stream}` will be invoked with data read from the
channel. By default, the callback will be invoked immediately when data is
available, to facilitate interactive communication. The same callback will
@@ -52,7 +52,11 @@ Alternatively the `{stream}_buffered` option can be set to invoke the callback
only when the underlying stream reaches EOF, and will then be passed in
complete output. This is helpful when only the complete output is useful, and
not partial data. Futhermore if `{stream}_buffered` is set but not a callback,
-the data is saved in the options dict, with the stream name as key.
+the data is saved in the options dict, with the stream name as key. For this
+to work a new options dict must be used for each opened channel. If a script
+uses a global `s:job_opts` dict, it can be copied with |copy()| before supplying
+it to |jobstart()|. If a dict is reused, so that the dict key already is
+occupied, error `E5210` will be raised.
- The arguments passed to the callback function are: