about summary refs log tree commit diff
path: root/Src/zsh.h
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-09-29 21:46:58 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-09-29 21:46:58 +0000
commite3fd25b18198709348af195dedadaceb88feb568 (patch)
treec79923638294a83398fdda1aef2698deafef0399 /Src/zsh.h
parent29db898a6d5eb41b4e3c8624bd1356d02571f5f0 (diff)
downloadzsh-e3fd25b18198709348af195dedadaceb88feb568.tar.gz
zsh-e3fd25b18198709348af195dedadaceb88feb568.tar.xz
zsh-e3fd25b18198709348af195dedadaceb88feb568.zip
25775: fix logical problem with function line numbering inside eval-style traps
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 */
 /***********/