From e3fd25b18198709348af195dedadaceb88feb568 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Mon, 29 Sep 2008 21:46:58 +0000 Subject: 25775: fix logical problem with function line numbering inside eval-style traps --- Src/zsh.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Src/zsh.h') 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 */ /***********/ -- cgit v1.2.3