patch 8.2.3305: Vim9: :finally in skipped block not handled correctly
Problem: Vim9: :finally in skipped block not handled correctly.
Solution: Check whether :finally is in a skipped block. (Naruhiko Nishino,
closes #8724)
diff --git a/src/ex_eval.c b/src/ex_eval.c
index 77dcecc..6bc7c18 100644
--- a/src/ex_eval.c
+++ b/src/ex_eval.c
@@ -2018,7 +2018,8 @@
{
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