Problem: The "trailing characters" error can be hard to understand.
Solution: Add the trailing characters to the message.
else
{
*end = i;
- emsg(_(e_trailing));
+ semsg(_(e_trailing_arg), arg);
return;
}
}
end = arg;
if (!get_list_range(&end, &hisidx1, &hisidx2) || *end != NUL)
{
- emsg(_(e_trailing));
+ semsg(_(e_trailing_arg), end);
return;
}
if (unlet && !VIM_ISWHITE(*p) && !ends_excmd(*p)
&& *p != '[' && *p != '.')
{
- emsg(_(e_trailing));
+ semsg(_(e_trailing_arg), p);
return NULL;
}
rettv->vval.v_number = 0;
}
else if (*s != NUL)
- emsg(_(e_trailing));
+ semsg(_(e_trailing_arg), s);
}
/*
if (end != NULL && lv.ll_name != NULL)
{
if (*end != NUL)
- emsg(_(e_trailing));
+ semsg(_(e_trailing_arg), end);
else
{
if (lv.ll_tv == NULL)
p = skiptowhite(marker);
if (*skipwhite(p) != NUL && *skipwhite(p) != '"')
{
- emsg(_(e_trailing));
+ semsg(_(e_trailing_arg), p);
return NULL;
}
*p = NUL;
if (!VIM_ISWHITE(*arg) && !ends_excmd(*arg))
{
emsg_severe = TRUE;
- emsg(_(e_trailing));
+ semsg(_(e_trailing_arg), arg);
break;
}
}
if (name_end != NULL)
{
emsg_severe = TRUE;
- emsg(_(e_trailing));
+ semsg(_(e_trailing_arg), name_end);
}
if (!(eap->skip || error))
clear_lval(&lv);
clear_lval(redir_lval);
if (redir_endp != NULL && *redir_endp != NUL)
// Trailing characters are present after the variable name
- emsg(_(e_trailing));
+ semsg(_(e_trailing_arg), redir_endp);
else
- emsg(_(e_invarg));
+ semsg(_(e_invarg2), name);
redir_endp = NULL; // don't store a value, only cleanup
var_redir_stop();
return FAIL;
eap->nextcmd = check_nextcmd(cmd);
if (eap->nextcmd == NULL)
{
- emsg(_(e_trailing));
+ semsg(_(e_trailing_arg), cmd);
return;
}
}
&& *ea.arg != '"' && (*ea.arg != '|' || (ea.argt & EX_TRLBAR) == 0))
{
// no arguments allowed but there is something
- errormsg = _(e_trailing);
+ errormsg = ex_errmsg(e_trailing_arg, ea.arg);
goto doend;
}
if (*eap->arg == NUL) // No argument?
emsg(_(e_argreq));
else if (eap->arg[1] != NUL) // more than one character?
- emsg(_(e_trailing));
+ semsg(_(e_trailing_arg), eap->arg);
else
{
pos = curwin->w_cursor; // save curwin->w_cursor
if (end != NULL && *end != NUL
&& !ends_excmd2(end, skipwhite(end + 1)))
{
- emsg(_(e_trailing));
+ semsg(_(e_trailing_arg), end);
return;
}
json_skip_white(reader);
if (reader->js_buf[reader->js_used] != NUL)
{
- emsg(_(e_trailing));
+ semsg(_(e_trailing_arg), reader->js_buf + reader->js_used);
return FAIL;
}
return OK;
}
else if (*map_to != NUL && (unmenu || enable != MAYBE))
{
- emsg(_(e_trailing));
+ semsg(_(e_trailing_arg), map_to);
goto theend;
}
#if defined(FEAT_GUI) && !(defined(FEAT_GUI_GTK) || defined(FEAT_GUI_PHOTON))
}
if (!get_list_range(&arg, &idx1, &idx2) || *arg != NUL)
{
- emsg(_(e_trailing));
+ semsg(_(e_trailing_arg), arg);
return;
}
qfl = qf_get_curlist(qi);
filename = arg;
*buf = buflist_findnr((int)getdigits(&arg));
if (*skipwhite(arg) != NUL)
- emsg(_(e_trailing));
+ semsg(_(e_trailing_arg), arg);
break;
}
else
{
if (!ends_excmd(*skipwhite(p)))
{
- emsg(_(e_trailing));
+ semsg(_(e_trailing_arg), p);
goto ret_free;
}
eap->nextcmd = check_nextcmd(p);
&& !(*p == '#' && (vim9script || eap->cmdidx == CMD_def))
&& !eap->skip
&& !did_emsg)
- emsg(_(e_trailing));
+ semsg(_(e_trailing_arg), p);
/*
* Read the body of the function, until "}", ":endfunction" or ":enddef" is
if (!ends_excmd(*skipwhite(p)))
{
vim_free(name);
- emsg(_(e_trailing));
+ semsg(_(e_trailing_arg), p);
return;
}
eap->nextcmd = check_nextcmd(p);
if (!failed)
{
emsg_severe = TRUE;
- emsg(_(e_trailing));
+ semsg(_(e_trailing_arg), arg);
}
}
else
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1281,
/**/
1280,
/**/