diff options
author | Sean Dewar <seandewar@users.noreply.github.com> | 2021-10-09 02:17:45 +0100 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-04-13 21:15:24 +0800 |
commit | 5feb8cdbb4d1ac01288058112702279c476f5aea (patch) | |
tree | 8a79c648d163dca5cab8e66ebdddb5bed0a7041e /src/nvim/ex_eval.c | |
parent | 64150517967fbe7fb111320c3dc1d16528aa547b (diff) | |
download | rneovim-5feb8cdbb4d1ac01288058112702279c476f5aea.tar.gz rneovim-5feb8cdbb4d1ac01288058112702279c476f5aea.tar.bz2 rneovim-5feb8cdbb4d1ac01288058112702279c476f5aea.zip |
vim-patch:8.2.3478: still crash with error in :catch and also in :finally
Problem: Still crash with error in :catch and also in :finally.
Solution: Only call finish_exception() once. (closes vim/vim#8954)
https://github.com/vim/vim/commit/f67d3fb7363ebc9454f9bb582de3978609a4fd6b
Exclude CSF_FUNC_DEF change (Vim9script).
Diffstat (limited to 'src/nvim/ex_eval.c')
-rw-r--r-- | src/nvim/ex_eval.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/ex_eval.c b/src/nvim/ex_eval.c index d9c14f143e..b5456e8982 100644 --- a/src/nvim/ex_eval.c +++ b/src/nvim/ex_eval.c @@ -1934,8 +1934,9 @@ int cleanup_conditionals(cstack_T *cstack, int searched_cond, int inclusive) */ if (!(cstack->cs_flags[idx] & CSF_FINALLY)) { if ((cstack->cs_flags[idx] & CSF_ACTIVE) - && (cstack->cs_flags[idx] & CSF_CAUGHT)) { + && (cstack->cs_flags[idx] & CSF_CAUGHT) && !(cstack->cs_flags[idx] & CSF_FINISHED)) { finish_exception((except_T *)cstack->cs_exception[idx]); + cstack->cs_flags[idx] |= CSF_FINISHED; } // Stop at this try conditional - except the try block never // got active (because of an inactive surrounding conditional |