diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-07-23 17:16:18 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-07-23 17:16:18 +0200 |
commit | 2d06bfde29bd3a62fc85823d2aa719ef943bd319 (patch) | |
tree | dac4bc628fbc1b9414f8901375abe0b9e975a736 /src/userfunc.c | |
parent | 8930caaa1a283092aca81fdbc3fcf15c7eadb197 (diff) | |
download | vim-git-2d06bfde29bd3a62fc85823d2aa719ef943bd319.tar.gz |
patch 8.2.1281: the "trailing characters" error can be hard to understandv8.2.1281
Problem: The "trailing characters" error can be hard to understand.
Solution: Add the trailing characters to the message.
Diffstat (limited to 'src/userfunc.c')
-rw-r--r-- | src/userfunc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/userfunc.c b/src/userfunc.c index 3967d2743..bf026d857 100644 --- a/src/userfunc.c +++ b/src/userfunc.c @@ -2664,7 +2664,7 @@ def_function(exarg_T *eap, char_u *name_arg) { if (!ends_excmd(*skipwhite(p))) { - emsg(_(e_trailing)); + semsg(_(e_trailing_arg), p); goto ret_free; } eap->nextcmd = check_nextcmd(p); @@ -2833,7 +2833,7 @@ def_function(exarg_T *eap, char_u *name_arg) && !(*p == '#' && (vim9script || eap->cmdidx == CMD_def)) && !eap->skip && !did_emsg) - emsg(_(e_trailing)); + semsg(_(e_trailing_arg), p); /* * Read the body of the function, until "}", ":endfunction" or ":enddef" is @@ -3629,7 +3629,7 @@ ex_delfunction(exarg_T *eap) if (!ends_excmd(*skipwhite(p))) { vim_free(name); - emsg(_(e_trailing)); + semsg(_(e_trailing_arg), p); return; } eap->nextcmd = check_nextcmd(p); @@ -3977,7 +3977,7 @@ ex_call(exarg_T *eap) if (!failed) { emsg_severe = TRUE; - emsg(_(e_trailing)); + semsg(_(e_trailing_arg), arg); } } else |