about summary refs log tree commit diff
path: root/Src/exec.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2004-09-03 09:47:44 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2004-09-03 09:47:44 +0000
commit97fd0d9b8907827d786b92f6cc66618d57ac7518 (patch)
tree84e4930f9db51eb8f5bb82006fd752cf8900fdc3 /Src/exec.c
parentfb7907257503b2c8915d3623c694bfb21122b7df (diff)
downloadzsh-97fd0d9b8907827d786b92f6cc66618d57ac7518.tar.gz
zsh-97fd0d9b8907827d786b92f6cc66618d57ac7518.tar.xz
zsh-97fd0d9b8907827d786b92f6cc66618d57ac7518.zip
20308: add EVAL_LINENO option
Diffstat (limited to 'Src/exec.c')
-rw-r--r--Src/exec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Src/exec.c b/Src/exec.c
index d1c3bb98e..5fd2a2e30 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -788,7 +788,7 @@ execsimple(Estate state)
 	return (lastval = 1);
 
     /* In evaluated traps, don't modify the line number. */
-    if ((!intrap || trapisfunc) && code)
+    if ((!intrap || trapisfunc) && !ineval && code)
 	lineno = code - 1;
 
     code = wc_code(*state->pc++);
@@ -1260,7 +1260,7 @@ execpline2(Estate state, wordcode pcode,
 	return;
 
     /* In evaluated traps, don't modify the line number. */
-    if ((!intrap || trapisfunc) && WC_PIPE_LINENO(pcode))
+    if ((!intrap || trapisfunc) && !ineval && WC_PIPE_LINENO(pcode))
 	lineno = WC_PIPE_LINENO(pcode) - 1;
 
     if (pline_level == 1) {