refactor!: rename nvim_add_user_command to nvim_create_user_command

This commit is contained in:
Gregory Anders
2022-04-10 19:12:41 -06:00
parent b2cb05b53e
commit f94f75dc05
6 changed files with 92 additions and 91 deletions

View File

@@ -2408,7 +2408,7 @@ Dictionary nvim_eval_statusline(String str, Dict(eval_statusline) *opts, Error *
///
/// Example:
/// <pre>
/// :call nvim_add_user_command('SayHello', 'echo "Hello world!"', {})
/// :call nvim_create_user_command('SayHello', 'echo "Hello world!"', {})
/// :SayHello
/// Hello world!
/// </pre>
@@ -2436,10 +2436,10 @@ Dictionary nvim_eval_statusline(String str, Dict(eval_statusline) *opts, Error *
/// {command}.
/// - force: (boolean, default true) Override any previous definition.
/// @param[out] err Error details, if any.
void nvim_add_user_command(String name, Object command, Dict(user_command) *opts, Error *err)
void nvim_create_user_command(String name, Object command, Dict(user_command) *opts, Error *err)
FUNC_API_SINCE(9)
{
add_user_command(name, command, opts, 0, err);
create_user_command(name, command, opts, 0, err);
}
/// Delete a user-defined command.