diff options
Diffstat (limited to 'src/ex_eval.c')
-rw-r--r-- | src/ex_eval.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/ex_eval.c b/src/ex_eval.c index 827f9cdcdb..77dceccf00 100644 --- a/src/ex_eval.c +++ b/src/ex_eval.c @@ -1461,6 +1461,18 @@ ex_endblock(exarg_T *eap) leave_block(cstack); } + int +inside_block(exarg_T *eap) +{ + cstack_T *cstack = eap->cstack; + int i; + + for (i = 0; i <= cstack->cs_idx; ++i) + if (cstack->cs_flags[cstack->cs_idx] & CSF_BLOCK) + return TRUE; + return FALSE; +} + /* * ":throw expr" */ |