mirror of
https://github.com/neovim/neovim.git
synced 2025-09-25 04:28:33 +00:00
API: nvim_get_commands(): always return keys
- Always return all keys, with at least NIL value. - Require `opts` param to be {"builtin":false} - Validate `opts` param
This commit is contained in:
@@ -959,17 +959,17 @@ ArrayOf(Dictionary) nvim_get_keymap(String mode)
|
||||
return keymap_array(mode, NULL);
|
||||
}
|
||||
|
||||
/// Gets a list of dictionaries describing global(non-buffer) commands.
|
||||
/// Gets a list of maps describing global |user-commands|.
|
||||
///
|
||||
/// @param opts Holds the API Metadata describing what type of commands
|
||||
/// are needed.
|
||||
/// @param opts Optional parameters. Currently only supports
|
||||
/// {"builtin":false}
|
||||
/// @param[out] err Error details, if any.
|
||||
///
|
||||
/// @returns Array of dictionaries describing commands.
|
||||
ArrayOf(Dictionary) nvim_get_commands(Dictionary opts, Error *err)
|
||||
FUNC_API_SINCE(4)
|
||||
{
|
||||
return commands_array(NULL);
|
||||
return nvim_buf_get_commands(-1, opts, err);
|
||||
}
|
||||
|
||||
/// Returns a 2-tuple (Array), where item 0 is the current channel id and item
|
||||
|
Reference in New Issue
Block a user