summaryrefslogtreecommitdiffstats
path: root/src/evalvars.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-08-14 14:27:30 +0200
committerBram Moolenaar <Bram@vim.org>2021-08-14 14:27:30 +0200
commitb521766c56c0e17db6e8615f35cf21012af0670c (patch)
treef443c04d8be083e6229a6b61344ac66df4588d5e /src/evalvars.c
parent88c89c77229e725ab2613b022249e2f506d82b82 (diff)
patch 8.2.3342: test for :let errors failsv8.2.3342
Problem: Test for :let errors fails. Solution: Adjust the test and how to avoid a second error message.
Diffstat (limited to 'src/evalvars.c')
-rw-r--r--src/evalvars.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/evalvars.c b/src/evalvars.c
index 86a6694041..3dc30e92be 100644
--- a/src/evalvars.c
+++ b/src/evalvars.c
@@ -1184,6 +1184,7 @@ list_arg_vars(exarg_T *eap, char_u *arg, int *first)
char_u *arg_subsc;
char_u *tofree;
typval_T tv;
+ int prev_uncaught_emsg = uncaught_emsg;
while (!ends_excmd2(eap->cmd, arg) && !got_int)
{
@@ -1193,7 +1194,7 @@ list_arg_vars(exarg_T *eap, char_u *arg, int *first)
if (!VIM_ISWHITE(*arg) && !ends_excmd(*arg))
{
emsg_severe = TRUE;
- if (!error)
+ if (uncaught_emsg == prev_uncaught_emsg)
semsg(_(e_trailing_arg), arg);
break;
}