diff runtime/doc/eval.txt @ 11211:71311d899b42 v8.0.0492

patch 8.0.0492: a failing client-server request can make Vim hang commit https://github.com/vim/vim/commit/81b9d0bd5c705815e903e671e81b0b05828efd9c Author: Bram Moolenaar <Bram@vim.org> Date: Sun Mar 19 21:20:53 2017 +0100 patch 8.0.0492: a failing client-server request can make Vim hang Problem: A failing client-server request can make Vim hang. Solution: Add a timeout argument to functions that wait.
author Christian Brabandt <cb@256bit.org>
date Sun, 19 Mar 2017 21:30:05 +0100
parents 13544aa85dc0
children d3415ec1cdaf
line wrap: on
line diff
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -6320,15 +6320,17 @@ reltimestr({time})				*reltimestr()*
 		{only available when compiled with the |+reltime| feature}
 
 							*remote_expr()* *E449*
-remote_expr({server}, {string} [, {idvar}])
+remote_expr({server}, {string} [, {idvar} [, {timeout}]])
 		Send the {string} to {server}.  The string is sent as an
 		expression and the result is returned after evaluation.
 		The result must be a String or a |List|.  A |List| is turned
 		into a String by joining the items with a line break in
 		between (not at the end), like with join(expr, "\n").
-		If {idvar} is present, it is taken as the name of a
-		variable and a {serverid} for later use with
+		If {idvar} is present and not empty, it is taken as the name
+		of a variable and a {serverid} for later use with
 		remote_read() is stored there.
+		If {timeout} is given the read times out after this many
+		seconds.  Otherwise a timeout of 600 seconds is used.
 		See also |clientserver| |RemoteReply|.
 		This function is not available in the |sandbox|.
 		{only available when compiled with the |+clientserver| feature}
@@ -6367,9 +6369,10 @@ remote_peek({serverid} [, {retvar}])		*r
 			:let repl = ""
 			:echo "PEEK: ".remote_peek(id, "repl").": ".repl
 
-remote_read({serverid})				*remote_read()*
+remote_read({serverid}, [{timeout}])			*remote_read()*
 		Return the oldest available reply from {serverid} and consume
-		it.  It blocks until a reply is available.
+		it.  Unless a {timeout} in seconds is given, it blocks until a
+		reply is available.
 		See also |clientserver|.
 		This function is not available in the |sandbox|.
 		{only available when compiled with the |+clientserver| feature}