diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-08-07 15:22:48 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-07 15:22:48 +0800 |
commit | fea15adad394619aaea69b627be249f8a20dc2ed (patch) | |
tree | b016aaf3d9c8cd62d701ebe8f0dbaf17f645bc3a /src/nvim/eval | |
parent | 0fdf59ac9d30d8874ba6eba22a8bdfb41c1603b7 (diff) | |
parent | 48051ed62cde6ab572bcd48768fe43740f3cd48c (diff) | |
download | rneovim-fea15adad394619aaea69b627be249f8a20dc2ed.tar.gz rneovim-fea15adad394619aaea69b627be249f8a20dc2ed.tar.bz2 rneovim-fea15adad394619aaea69b627be249f8a20dc2ed.zip |
Merge pull request #19669 from zeertzjq/vim-8.2.1278
vim-patch:8.2.{1278,1280,1281}: error message improvements
Diffstat (limited to 'src/nvim/eval')
-rw-r--r-- | src/nvim/eval/funcs.c | 4 | ||||
-rw-r--r-- | src/nvim/eval/userfunc.c | 8 | ||||
-rw-r--r-- | src/nvim/eval/vars.c | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/src/nvim/eval/funcs.c b/src/nvim/eval/funcs.c index d121c106d0..060dc50f52 100644 --- a/src/nvim/eval/funcs.c +++ b/src/nvim/eval/funcs.c @@ -1839,7 +1839,7 @@ static void f_eval(typval_T *argvars, typval_T *rettv, FunPtr fptr) rettv->v_type = VAR_NUMBER; rettv->vval.v_number = 0; } else if (*s != NUL) { - emsg(_(e_trailing)); + semsg(_(e_trailing_arg), s); } } @@ -4702,7 +4702,7 @@ static void f_islocked(typval_T *argvars, typval_T *rettv, FunPtr fptr) FNE_CHECK_START); if (end != NULL && lv.ll_name != NULL) { if (*end != NUL) { - emsg(_(e_trailing)); + semsg(_(e_trailing_arg), end); } else { if (lv.ll_tv == NULL) { di = find_var(lv.ll_name, lv.ll_name_len, NULL, true); diff --git a/src/nvim/eval/userfunc.c b/src/nvim/eval/userfunc.c index a90148bf23..2f4799db57 100644 --- a/src/nvim/eval/userfunc.c +++ b/src/nvim/eval/userfunc.c @@ -2039,7 +2039,7 @@ void ex_function(exarg_T *eap) // if (!paren) { if (!ends_excmd(*skipwhite((char *)p))) { - emsg(_(e_trailing)); + semsg(_(e_trailing_arg), p); goto ret_free; } eap->nextcmd = (char *)check_nextcmd(p); @@ -2163,7 +2163,7 @@ void ex_function(exarg_T *eap) if (*p == '\n') { line_arg = p + 1; } else if (*p != NUL && *p != '"' && !eap->skip && !did_emsg) { - emsg(_(e_trailing)); + semsg(_(e_trailing_arg), p); } /* @@ -2703,7 +2703,7 @@ void ex_delfunction(exarg_T *eap) } if (!ends_excmd(*skipwhite((char *)p))) { xfree(name); - emsg(_(e_trailing)); + semsg(_(e_trailing_arg), p); return; } eap->nextcmd = (char *)check_nextcmd(p); @@ -3021,7 +3021,7 @@ void ex_call(exarg_T *eap) if (!ends_excmd(*arg)) { if (!failed && !aborting()) { emsg_severe = true; - emsg(_(e_trailing)); + semsg(_(e_trailing_arg), arg); } } else { eap->nextcmd = (char *)check_nextcmd(arg); 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); |