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/vars.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/nvim/eval/vars.c') diff --git a/src/nvim/eval/vars.c b/src/nvim/eval/vars.c index dec3ef68aa..033b6094b4 100644 --- a/src/nvim/eval/vars.c +++ b/src/nvim/eval/vars.c @@ -80,7 +80,7 @@ static list_T *heredoc_get(exarg_T *eap, char *cmd) marker = skipwhite(cmd); p = (char *)skiptowhite((char_u *)marker); if (*skipwhite(p) != NUL && *skipwhite(p) != '"') { - emsg(_(e_trailing)); + semsg(_(e_trailing_arg), p); return NULL; } *p = NUL; @@ -460,7 +460,7 @@ static const char *list_arg_vars(exarg_T *eap, const char *arg, int *first) arg = find_name_end(arg, NULL, NULL, FNE_INCL_BR | FNE_CHECK_START); if (!ascii_iswhite(*arg) && !ends_excmd(*arg)) { emsg_severe = true; - emsg(_(e_trailing)); + semsg(_(e_trailing_arg), arg); break; } } else { @@ -808,7 +808,7 @@ static void ex_unletlock(exarg_T *eap, char *argstart, int deep, ex_unletlock_ca || (!ascii_iswhite(*name_end) && !ends_excmd(*name_end))) { if (name_end != NULL) { emsg_severe = true; - emsg(_(e_trailing)); + semsg(_(e_trailing_arg), name_end); } if (!(eap->skip || error)) { clear_lval(&lv); -- cgit