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/cmdhist.c b/src/cmdhist.c
index d708535..69c83c0 100644
--- a/src/cmdhist.c
+++ b/src/cmdhist.c
@@ -705,7 +705,7 @@
else
{
*end = i;
- emsg(_(e_trailing));
+ semsg(_(e_trailing_arg), arg);
return;
}
}
@@ -717,7 +717,7 @@
end = arg;
if (!get_list_range(&end, &hisidx1, &hisidx2) || *end != NUL)
{
- emsg(_(e_trailing));
+ semsg(_(e_trailing_arg), end);
return;
}