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/eval/vars.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/eval/vars.c')
-rw-r--r-- | src/nvim/eval/vars.c | 6 |
1 files changed, 3 insertions, 3 deletions
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); |