From 48051ed62cde6ab572bcd48768fe43740f3cd48c Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 7 Aug 2022 14:09:32 +0800 Subject: 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 --- src/nvim/eval.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/nvim/eval.c') diff --git a/src/nvim/eval.c b/src/nvim/eval.c index fc627ae5db..5911a93099 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -544,9 +544,9 @@ int var_redir_start(char *name, int append) 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(); @@ -1326,7 +1326,7 @@ char *get_lval(char *const name, typval_T *const rettv, lval_T *const lp, const // Don't expand the name when we already know there is an error. if (unlet && !ascii_iswhite(*p) && !ends_excmd(*p) && *p != '[' && *p != '.') { - emsg(_(e_trailing)); + semsg(_(e_trailing_arg), p); return NULL; } -- cgit