Mercurial > vim
comparison src/evalvars.c @ 25611:f142bfebaac1 v8.2.3342
patch 8.2.3342: test for :let errors fails
Commit: https://github.com/vim/vim/commit/b521766c56c0e17db6e8615f35cf21012af0670c
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Aug 14 14:27:30 2021 +0200
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 14 Aug 2021 14:30:04 +0200 |
parents | f8bcd21e6e24 |
children | 994cad298596 |
comparison
equal
deleted
inserted
replaced
25610:ac9f242ebb9e | 25611:f142bfebaac1 |
---|---|
1182 char_u *name; | 1182 char_u *name; |
1183 char_u *name_start; | 1183 char_u *name_start; |
1184 char_u *arg_subsc; | 1184 char_u *arg_subsc; |
1185 char_u *tofree; | 1185 char_u *tofree; |
1186 typval_T tv; | 1186 typval_T tv; |
1187 int prev_uncaught_emsg = uncaught_emsg; | |
1187 | 1188 |
1188 while (!ends_excmd2(eap->cmd, arg) && !got_int) | 1189 while (!ends_excmd2(eap->cmd, arg) && !got_int) |
1189 { | 1190 { |
1190 if (error || eap->skip) | 1191 if (error || eap->skip) |
1191 { | 1192 { |
1192 arg = find_name_end(arg, NULL, NULL, FNE_INCL_BR | FNE_CHECK_START); | 1193 arg = find_name_end(arg, NULL, NULL, FNE_INCL_BR | FNE_CHECK_START); |
1193 if (!VIM_ISWHITE(*arg) && !ends_excmd(*arg)) | 1194 if (!VIM_ISWHITE(*arg) && !ends_excmd(*arg)) |
1194 { | 1195 { |
1195 emsg_severe = TRUE; | 1196 emsg_severe = TRUE; |
1196 if (!error) | 1197 if (uncaught_emsg == prev_uncaught_emsg) |
1197 semsg(_(e_trailing_arg), arg); | 1198 semsg(_(e_trailing_arg), arg); |
1198 break; | 1199 break; |
1199 } | 1200 } |
1200 } | 1201 } |
1201 else | 1202 else |