mirror of
https://github.com/neovim/neovim.git
synced 2025-11-16 15:21:20 +00:00
Merge #4938 from justinmk/coverity
coverity/149459: CHECKED_RETURN (false positive)
This commit is contained in:
@@ -2198,8 +2198,7 @@ and({expr}, {expr}) *and()*
|
|||||||
|
|
||||||
|
|
||||||
api_info() *api_info()*
|
api_info() *api_info()*
|
||||||
Return Dictionary containing api metadata.
|
Returns Dictionary of |api-metadata|.
|
||||||
See |api-metadata|.
|
|
||||||
|
|
||||||
|
|
||||||
append({lnum}, {expr}) *append()*
|
append({lnum}, {expr}) *append()*
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ RPC API for Nvim *RPC* *rpc* *msgpack-rpc*
|
|||||||
1. Introduction |rpc-intro|
|
1. Introduction |rpc-intro|
|
||||||
2. API mapping |rpc-api|
|
2. API mapping |rpc-api|
|
||||||
3. Connecting |rpc-connecting|
|
3. Connecting |rpc-connecting|
|
||||||
4. Clients |rpc-client|
|
4. Clients |rpc-api-client|
|
||||||
5. Types |rpc-types|
|
5. Types |rpc-types|
|
||||||
6. Vimscript functions |rpc-vim-functions|
|
6. Vimscript functions |rpc-vim-functions|
|
||||||
|
|
||||||
@@ -51,11 +51,10 @@ There are three ways to obtain API metadata:
|
|||||||
msgpack-rpc. This is best for clients written in dynamic languages which
|
msgpack-rpc. This is best for clients written in dynamic languages which
|
||||||
can define functions at runtime.
|
can define functions at runtime.
|
||||||
|
|
||||||
2. Start Nvim with the `--api-info` command-line option, which dumps a blob
|
2. Start Nvim with the |--api-info| option. Useful for clients written in
|
||||||
of msgpack metadata to standard output. This is useful for clients
|
statically-compiled languages.
|
||||||
written in statically-compiled languages.
|
|
||||||
|
|
||||||
3. In vimscript the metadata is available as |api_info()|.
|
3. Use the |api_info()| vimscript function.
|
||||||
|
|
||||||
To get a human-readable list of API functions: >
|
To get a human-readable list of API functions: >
|
||||||
:new|put =map(api_info().functions, 'v:val.name')
|
:new|put =map(api_info().functions, 'v:val.name')
|
||||||
|
|||||||
@@ -350,6 +350,9 @@ argument.
|
|||||||
*-W*
|
*-W*
|
||||||
-W {scriptout} Like -w, but do not append, overwrite an existing file.
|
-W {scriptout} Like -w, but do not append, overwrite an existing file.
|
||||||
|
|
||||||
|
*--api-info*
|
||||||
|
--api-info Print msgpack-encoded |api-metadata| and exit.
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
2. Initialization *initialization* *startup*
|
2. Initialization *initialization* *startup*
|
||||||
|
|
||||||
|
|||||||
@@ -7472,7 +7472,7 @@ static void f_and(typval_T *argvars, typval_T *rettv)
|
|||||||
static void f_api_info(typval_T *argvars, typval_T *rettv)
|
static void f_api_info(typval_T *argvars, typval_T *rettv)
|
||||||
{
|
{
|
||||||
Dictionary metadata = api_metadata();
|
Dictionary metadata = api_metadata();
|
||||||
object_to_vim(DICTIONARY_OBJ(metadata), rettv, NULL);
|
(void)object_to_vim(DICTIONARY_OBJ(metadata), rettv, NULL);
|
||||||
api_free_dictionary(metadata);
|
api_free_dictionary(metadata);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user