summaryrefslogtreecommitdiff
path: root/Src/zsh.h
diff options
context:
space:
mode:
Diffstat (limited to 'Src/zsh.h')
-rw-r--r--Src/zsh.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/Src/zsh.h b/Src/zsh.h
index ddbf24048..2ceab1dca 100644
--- a/Src/zsh.h
+++ b/Src/zsh.h
@@ -924,6 +924,7 @@ struct execstack {
int trap_return;
int trap_state;
int trapisfunc;
+ int traplocallevel;
int noerrs;
int subsh_close;
char *underscore;
@@ -2261,6 +2262,9 @@ enum trap_state {
TRAP_STATE_FORCE_RETURN
};
+#define IN_EVAL_TRAP() \
+ (intrap && !trapisfunc && traplocallevel == locallevel)
+
/***********/
/* Sorting */
/***********/