diff options
Diffstat (limited to 'src/nvim/usercmd.c')
-rw-r--r-- | src/nvim/usercmd.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/usercmd.c b/src/nvim/usercmd.c index b58ccc809b..8c2f8533d8 100644 --- a/src/nvim/usercmd.c +++ b/src/nvim/usercmd.c @@ -861,7 +861,7 @@ char *uc_validate_name(char *name) /// /// @return OK if the command is created, FAIL otherwise. int uc_add_command(char *name, size_t name_len, const char *rep, uint32_t argt, int64_t def, - int flags, int compl, char *compl_arg, LuaRef compl_luaref, + int flags, int context, char *compl_arg, LuaRef compl_luaref, LuaRef preview_luaref, cmd_addr_T addr_type, LuaRef luaref, bool force) FUNC_ATTR_NONNULL_ARG(1, 3) { @@ -944,7 +944,7 @@ int uc_add_command(char *name, size_t name_len, const char *rep, uint32_t argt, cmd->uc_rep = rep_buf; cmd->uc_argt = argt; cmd->uc_def = def; - cmd->uc_compl = compl; + cmd->uc_compl = context; cmd->uc_script_ctx = current_sctx; cmd->uc_script_ctx.sc_lnum += SOURCING_LNUM; nlua_set_sctx(&cmd->uc_script_ctx); @@ -974,7 +974,7 @@ void ex_command(exarg_T *eap) uint32_t argt = 0; long def = -1; int flags = 0; - int compl = EXPAND_NOTHING; + int context = EXPAND_NOTHING; char *compl_arg = NULL; cmd_addr_T addr_type_arg = ADDR_NONE; int has_attr = (eap->arg[0] == '-'); @@ -986,7 +986,7 @@ void ex_command(exarg_T *eap) while (*p == '-') { p++; end = skiptowhite(p); - if (uc_scan_attr(p, (size_t)(end - p), &argt, &def, &flags, &compl, &compl_arg, + if (uc_scan_attr(p, (size_t)(end - p), &argt, &def, &flags, &context, &compl_arg, &addr_type_arg) == FAIL) { goto theend; } @@ -1011,10 +1011,10 @@ void ex_command(exarg_T *eap) emsg(_("E183: User defined commands must start with an uppercase letter")); } else if (name_len <= 4 && strncmp(name, "Next", name_len) == 0) { emsg(_("E841: Reserved name, cannot be used for user defined command")); - } else if (compl > 0 && (argt & EX_EXTRA) == 0) { + } else if (context > 0 && (argt & EX_EXTRA) == 0) { emsg(_(e_complete_used_without_allowing_arguments)); } else { - uc_add_command(name, name_len, p, argt, def, flags, compl, compl_arg, LUA_NOREF, LUA_NOREF, + uc_add_command(name, name_len, p, argt, def, flags, context, compl_arg, LUA_NOREF, LUA_NOREF, addr_type_arg, LUA_NOREF, eap->forceit); return; // success |