diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-08-07 14:09:32 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-08-07 14:39:19 +0800 |
commit | 48051ed62cde6ab572bcd48768fe43740f3cd48c (patch) | |
tree | b016aaf3d9c8cd62d701ebe8f0dbaf17f645bc3a /src/nvim/ex_docmd.c | |
parent | d0686540f56154e269e11eb0cc6cd3eb759f2b77 (diff) | |
download | rneovim-48051ed62cde6ab572bcd48768fe43740f3cd48c.tar.gz rneovim-48051ed62cde6ab572bcd48768fe43740f3cd48c.tar.bz2 rneovim-48051ed62cde6ab572bcd48768fe43740f3cd48c.zip |
vim-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.
https://github.com/vim/vim/commit/2d06bfde29bd3a62fc85823d2aa719ef943bd319
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r-- | src/nvim/ex_docmd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index 70d729963c..4ac9847e53 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -2266,7 +2266,7 @@ static char *do_one_cmd(char **cmdlinep, int flags, cstack_T *cstack, LineGetter if (!ni && !(ea.argt & EX_EXTRA) && *ea.arg != NUL && *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; } @@ -7274,7 +7274,7 @@ static void ex_mark(exarg_T *eap) 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 curwin->w_cursor.lnum = eap->line2; |