Mercurial > vim
comparison src/eval.c @ 23096:b6aadb0b3a56 v8.2.2094
patch 8.2.2094: when an expression fails getting next command may be wrong
Commit: https://github.com/vim/vim/commit/d0fe620cbbf5f5e00446efa89893036265c5c302
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Dec 5 17:11:12 2020 +0100
patch 8.2.2094: when an expression fails getting next command may be wrong
Problem: When an expression fails getting the next command may be wrong.
Solution: Do not check for a next command after :eval fails. (closes https://github.com/vim/vim/issues/7415)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 05 Dec 2020 17:15:03 +0100 |
parents | 4b398a229b0b |
children | 3e7723bab4e5 |
comparison
equal
deleted
inserted
replaced
23095:211188403293 | 23096:b6aadb0b3a56 |
---|---|
2154 if (!aborting() | 2154 if (!aborting() |
2155 && did_emsg == did_emsg_before | 2155 && did_emsg == did_emsg_before |
2156 && called_emsg == called_emsg_before | 2156 && called_emsg == called_emsg_before |
2157 && (flags & EVAL_CONSTANT) == 0) | 2157 && (flags & EVAL_CONSTANT) == 0) |
2158 semsg(_(e_invexpr2), arg); | 2158 semsg(_(e_invexpr2), arg); |
2159 ret = FAIL; | 2159 |
2160 // Some of the expression may not have been consumed. Do not check for | |
2161 // a next command to avoid more errors. | |
2162 return FAIL; | |
2160 } | 2163 } |
2161 | 2164 |
2162 if (eap != NULL) | 2165 if (eap != NULL) |
2163 eap->nextcmd = check_nextcmd(p); | 2166 eap->nextcmd = check_nextcmd(p); |
2164 | 2167 |