patch 8.2.1280: Ex command error cannot contain an argument
Problem: Ex command error cannot contain an argument.
Solution: Add ex_errmsg() and translate earlier. Use e_trailing_arg where
possible.
diff --git a/src/buffer.c b/src/buffer.c
index 54afb13..8a791d4 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1188,7 +1188,7 @@
if (addr_count == 2)
{
if (*arg) // both range and argument is not allowed
- return _(e_trailing);
+ return ex_errmsg(e_trailing_arg, arg);
bnr = start_bnr;
}
else // addr_count == 1