patch 8.2.1281: the "trailing characters" error can be hard to understand
Problem: The "trailing characters" error can be hard to understand.
Solution: Add the trailing characters to the message.
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 4f27898..bd3de8f 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -2396,7 +2396,7 @@
&& *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;
}
@@ -7725,7 +7725,7 @@
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