patch 7.4.1624
Problem: Can't get info about a channel.
Solution: Add ch_info().
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 43e25fa..642f0ad 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt* For Vim version 7.4. Last change: 2016 Mar 15
+*eval.txt* For Vim version 7.4. Last change: 2016 Mar 20
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -753,7 +753,12 @@
*E693* *E694*
A |Funcref| can only be compared with a |Funcref| and only "equal" and "not
-equal" can be used. Case is never ignored.
+equal" can be used. Case is never ignored. Whether arguments or a Dictionary
+are bound (with a partial) is ignored. This is so that when a function is
+made a member of a Dictionary it is still considered to be the same function.
+To compare partials to see if they bind the same argument and Dictionary
+values use string(): >
+ echo string(Partial1) == string(Partial2)
When using "is" or "isnot" with a |List| or a |Dictionary| this checks if the
expressions are referring to the same |List| or |Dictionary| instance. A copy
@@ -1822,6 +1827,7 @@
any evaluate {string} on raw {handle}
ch_getbufnr( {handle}, {what}) Number get buffer number for {handle}/{what}
ch_getjob( {channel}) Job get the Job of {channel}
+ch_info( {handle}) String info about channel {handle}
ch_log( {msg} [, {handle}]) none write {msg} in the channel log file
ch_logfile( {fname} [, {mode}]) none start logging channel activity
ch_open( {address} [, {options}]) Channel open a channel to {address}
@@ -1832,7 +1838,7 @@
ch_sendraw( {handle}, {string} [, {options}])
any send {string} over raw {handle}
ch_setoptions( {handle}, {options}) none set options for {handle}
-ch_status( {handle}) String status of {handle}
+ch_status( {handle}) String status of channel {handle}
changenr() Number current change number
char2nr( {expr}[, {utf8}]) Number ASCII/UTF8 value of first char in {expr}
cindent( {lnum}) Number C indent for line {lnum}
@@ -2759,6 +2765,32 @@
{only available when compiled with the |+channel| and
|+job| features}
+ch_info({handle}) *ch_info()*
+ Returns a Dictionary with information about {handle}. The
+ items are:
+ "id" number of the channel
+ "status" "open" (any part is open) or "closed"
+ When opened with ch_open():
+ "hostname" the hostname of the address
+ "port" the port of the address
+ "sock_status" "open" or "closed"
+ "sock_mode" "NL", "RAW", "JSON" or "JS"
+ "sock_io" "socket"
+ "sock_timeout" timeout in msec
+ When opened with job_start():
+ "out_status" "open" or "closed"
+ "out_mode" "NL", "RAW", "JSON" or "JS"
+ "out_io" "null", "pipe", "file" or "buffer"
+ "out_timeout" timeout in msec
+ "err_status" "open" or "closed"
+ "err_mode" "NL", "RAW", "JSON" or "JS"
+ "err_io" "out", "null", "pipe", "file" or "buffer"
+ "err_timeout" timeout in msec
+ "in_status" "open" or "closed"
+ "in_mode" "NL", "RAW", "JSON" or "JS"
+ "in_io" "null", "pipe", "file" or "buffer"
+ "in_timeout" timeout in msec
+
ch_log({msg} [, {handle}]) *ch_log()*
Write {msg} in the channel log file, if it was opened with
|ch_logfile()|.
@@ -3594,6 +3626,18 @@
< Invokes the function as with: >
call Callback('one', 'two', 'name')
+< The function() call can be nested to add more arguments to the
+ Funcref. The extra arguments are appended to the list of
+ arguments. Example: >
+ func Callback(arg1, arg2, name)
+ ...
+ let Func = function('Callback', ['one'])
+ let Func2 = function(Func, ['two'])
+ ...
+ call Func2('name')
+< Invokes the function as with: >
+ call Callback('one', 'two', 'name')
+
< The Dictionary is only useful when calling a "dict" function.
In that case the {dict} is passed in as "self". Example: >
function Callback() dict
@@ -7050,6 +7094,10 @@
intervals.
{only available when compiled with the |+timers| feature}
+timer_stop({timer}) *timer_stop()*
+ Stop a timer. {timer} is an ID returned by timer_start().
+ The timer callback will no longer be invoked.
+
tolower({expr}) *tolower()*
The result is a copy of the String given, with all uppercase
characters turned into lowercase (just like applying |gu| to