1
0
forked from aniani/vim

patch 8.2.3342: test for :let errors fails

Problem:    Test for :let errors fails.
Solution:   Adjust the test and how to avoid a second error message.
This commit is contained in:
Bram Moolenaar
2021-08-14 14:27:30 +02:00
parent 88c89c7722
commit b521766c56
3 changed files with 5 additions and 2 deletions

View File

@@ -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;
}