diff options
Diffstat (limited to 'src/nvim/api/command.c')
-rw-r--r-- | src/nvim/api/command.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/api/command.c b/src/nvim/api/command.c index 26ee9205b2..7c01dc0e54 100644 --- a/src/nvim/api/command.c +++ b/src/nvim/api/command.c @@ -1015,7 +1015,7 @@ void create_user_command(uint64_t channel_id, String name, Object command, Dict( uint32_t argt = 0; int64_t def = -1; cmd_addr_T addr_type_arg = ADDR_NONE; - int compl = EXPAND_NOTHING; + int context = EXPAND_NOTHING; char *compl_arg = NULL; const char *rep = NULL; LuaRef luaref = LUA_NOREF; @@ -1161,11 +1161,11 @@ void create_user_command(uint64_t channel_id, String name, Object command, Dict( } if (opts->complete.type == kObjectTypeLuaRef) { - compl = EXPAND_USER_LUA; + context = EXPAND_USER_LUA; compl_luaref = api_new_luaref(opts->complete.data.luaref); } else if (opts->complete.type == kObjectTypeString) { VALIDATE_S(OK == parse_compl_arg(opts->complete.data.string.data, - (int)opts->complete.data.string.size, &compl, &argt, + (int)opts->complete.data.string.size, &context, &argt, &compl_arg), "complete", opts->complete.data.string.data, { goto err; @@ -1204,8 +1204,8 @@ void create_user_command(uint64_t channel_id, String name, Object command, Dict( } WITH_SCRIPT_CONTEXT(channel_id, { - if (uc_add_command(name.data, name.size, rep, argt, def, flags, compl, compl_arg, compl_luaref, - preview_luaref, addr_type_arg, luaref, force) != OK) { + if (uc_add_command(name.data, name.size, rep, argt, def, flags, context, compl_arg, + compl_luaref, preview_luaref, addr_type_arg, luaref, force) != OK) { api_set_error(err, kErrorTypeException, "Failed to create user command"); // Do not goto err, since uc_add_command now owns luaref, compl_luaref, and compl_arg } |