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