summaryrefslogtreecommitdiffstats
path: root/src/ex_eval.c
diff options
context:
space:
mode:
authorrbtnn <naru123456789@gmail.com>2021-08-07 13:26:53 +0200
committerBram Moolenaar <Bram@vim.org>2021-08-07 13:26:53 +0200
commit84934998806408db3f3ecff7ac4c3980e0c2a96e (patch)
tree5894dbb121834f24eb2198da9ebcdcd59cf02071 /src/ex_eval.c
parentc611941c606328740b6e9acc1191a5d97ace13e2 (diff)
patch 8.2.3305: Vim9: :finally in skipped block not handled correctlyv8.2.3305
Problem: Vim9: :finally in skipped block not handled correctly. Solution: Check whether :finally is in a skipped block. (Naruhiko Nishino, closes #8724)
Diffstat (limited to 'src/ex_eval.c')
-rw-r--r--src/ex_eval.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ex_eval.c b/src/ex_eval.c
index 77dceccf00..6bc7c18b84 100644
--- a/src/ex_eval.c
+++ b/src/ex_eval.c
@@ -2018,7 +2018,8 @@ ex_endtry(exarg_T *eap)
{
idx = cstack->cs_idx;
- if (in_vim9script()
+ // Check the flags only when not in a skipped block.
+ if (!skip && in_vim9script()
&& (cstack->cs_flags[idx] & (CSF_CATCH|CSF_FINALLY)) == 0)
{
// try/endtry without any catch or finally: give an error and