This commit is contained in:
Justin M. Keyes
2018-05-06 21:14:25 +02:00
parent ebb1acb3c0
commit 34b6a3d944
3 changed files with 25 additions and 29 deletions

View File

@@ -120,9 +120,7 @@ bool try_end(Error *err)
// try_enter/try_leave. // try_enter/try_leave.
trylevel--; trylevel--;
// Without this it stops processing all subsequent VimL commands and // Set by emsg(), affects aborting(). See also enter_cleanup().
// generates strange error messages if I e.g. try calling Test() in a
// cycle
did_emsg = false; did_emsg = false;
if (got_int) { if (got_int) {

View File

@@ -934,27 +934,26 @@ Array nvim_get_api_info(uint64_t channel_id)
return rv; return rv;
} }
/// Call many api methods atomically /// Calls many API methods atomically.
/// ///
/// This has two main usages: Firstly, to perform several requests from an /// This has two main usages:
/// async context atomically, i.e. without processing requests from other rpc /// 1. To perform several requests from an async context atomically, i.e.
/// clients or redrawing or allowing user interaction in between. Note that api /// without interleaving redraws, RPC requests from other clients, or user
/// methods that could fire autocommands or do event processing still might do /// interactions (however API methods may trigger autocommands or event
/// so. For instance invoking the :sleep command might call timer callbacks. /// processing which have such side-effects, e.g. |:sleep| may wake timers).
/// Secondly, it can be used to reduce rpc overhead (roundtrips) when doing /// 2. To minimize RPC overhead (roundtrips) of a sequence of many requests.
/// many requests in sequence.
/// ///
/// @param calls an array of calls, where each call is described by an array /// @param calls an array of calls, where each call is described by an array
/// with two elements: the request name, and an array of arguments. /// with two elements: the request name, and an array of arguments.
/// @param[out] err Details of a validation error of the nvim_multi_request call /// @param[out] err Details of a validation error of the nvim_multi_request call
/// itself, i e malformatted `calls` parameter. Errors from called methods will /// itself, i.e. malformed `calls` parameter. Errors from called methods will
/// be indicated in the return value, see below. /// be indicated in the return value, see below.
/// ///
/// @return an array with two elements. The first is an array of return /// @return an array with two elements. The first is an array of return
/// values. The second is NIL if all calls succeeded. If a call resulted in /// values. The second is NIL if all calls succeeded. If a call resulted in
/// an error, it is a three-element array with the zero-based index of the call /// an error, it is a three-element array with the zero-based index of the call
/// which resulted in an error, the error type and the error message. If an /// which resulted in an error, the error type and the error message. If an
/// error ocurred, the values from all preceding calls will still be returned. /// error occurred, the values from all preceding calls will still be returned.
Array nvim_call_atomic(uint64_t channel_id, Array calls, Error *err) Array nvim_call_atomic(uint64_t channel_id, Array calls, Error *err)
FUNC_API_SINCE(1) FUNC_API_REMOTE_ONLY FUNC_API_SINCE(1) FUNC_API_REMOTE_ONLY
{ {

View File

@@ -28,22 +28,21 @@
#ifdef INCLUDE_GENERATED_DECLARATIONS #ifdef INCLUDE_GENERATED_DECLARATIONS
# include "ex_eval.c.generated.h" # include "ex_eval.c.generated.h"
#endif #endif
/*
* Exception handling terms: // Exception handling terms:
* //
* :try ":try" command \ // :try ":try" command ─┐
* ... try block | // ... try block │
* :catch RE ":catch" command | // :catch RE ":catch" command
* ... catch clause |- try conditional // ... catch clause ├─ try conditional
* :finally ":finally" command | // :finally ":finally" command
* ... finally clause | // ... finally clause
* :endtry ":endtry" command / // :endtry ":endtry" command ─┘
* //
* The try conditional may have any number of catch clauses and at most one // The try conditional may have any number of catch clauses and at most one
* finally clause. A ":throw" command can be inside the try block, a catch // finally clause. A ":throw" command can be inside the try block, a catch
* clause, the finally clause, or in a function called or script sourced from // clause, the finally clause, or in a function called or script sourced from
* there or even outside the try conditional. Try conditionals may be nested. // there or even outside the try conditional. Try conditionals may be nested.
*/
// Configuration whether an exception is thrown on error or interrupt. When // Configuration whether an exception is thrown on error or interrupt. When
// the preprocessor macros below evaluate to FALSE, an error (did_emsg) or // the preprocessor macros below evaluate to FALSE, an error (did_emsg) or