summaryrefslogtreecommitdiffstats
path: root/runtime/doc/channel.txt
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-12-05 21:54:04 +0000
committerBram Moolenaar <Bram@vim.org>2021-12-05 21:54:04 +0000
commit4700398e384f38f752b432e187462f404b96847d (patch)
tree581e9d76947deae9644e1a241e0aa12df0783aff /runtime/doc/channel.txt
parent12f3c1b77fb39dc338304d5484cdbc99da27389a (diff)
Update runtime files
Diffstat (limited to 'runtime/doc/channel.txt')
-rw-r--r--runtime/doc/channel.txt9
1 files changed, 5 insertions, 4 deletions
diff --git a/runtime/doc/channel.txt b/runtime/doc/channel.txt
index 39cb43c004..6124a89458 100644
--- a/runtime/doc/channel.txt
+++ b/runtime/doc/channel.txt
@@ -1,4 +1,4 @@
-*channel.txt* For Vim version 8.2. Last change: 2020 Oct 17
+*channel.txt* For Vim version 8.2. Last change: 2021 Nov 28
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -101,7 +101,7 @@ Instead of giving a callback with every send call, it can also be specified
when opening the channel: >
call ch_close(channel)
let channel = ch_open('localhost:8765', {'callback': "MyHandler"})
- call ch_sendexpr(channel, 'hello!')
+ call ch_sendexpr(channel, 'hello channel!')
When trying out channels it's useful to see what is going on. You can tell
Vim to write lines in log file: >
@@ -132,8 +132,9 @@ When using an IPv6 address, enclose it within square brackets. E.g.,
"raw" - Use raw messages
*channel-callback* *E921*
"callback" A function that is called when a message is received that is
- not handled otherwise. It gets two arguments: the channel
- and the received message. Example: >
+ not handled otherwise (e.g. a JSON message with ID zero). It
+ gets two arguments: the channel and the received message.
+ Example: >
func Handle(channel, msg)
echo 'Received: ' . a:msg
endfunc