1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-06-01 12:56:04 +02:00

25570: line numbers of complex sublists were wrong, plus test

make lineno zlong in another place
This commit is contained in:
Peter Stephenson 2008-08-31 16:01:10 +00:00
parent d19602a65a
commit b41c26d78a
4 changed files with 18 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2008-08-31 Peter Stephenson <p.w.stephenson@ntlworld.com>
* 25570: Src/exec.c, Src/zsh.h, Test/C03traps.ztst: line numbers
of complex sublists were wrong, plus test; another place to make
lineno more consistent.
2008-08-31 Andrey Borzenkov <bor@zsh.org>
* users/13169: Src/exec.c: really restore emulation mode when

View File

@ -1060,7 +1060,7 @@ execlist(Estate state, int dont_change_job, int exiting)
lnp1 = code2;
} else if (wc_code(code2) == WC_SUBLIST) {
if (WC_SUBLIST_FLAGS(code2) == WC_SUBLIST_SIMPLE)
lnp1 = state->pc[2];
lnp1 = state->pc[1];
else
lnp1 = WC_PIPE_LINENO(state->pc[1]);
}

View File

@ -1063,7 +1063,7 @@ struct cmdnam {
struct shfunc {
struct hashnode node;
char *filename; /* Name of file located in */
int lineno; /* line number in above file */
zlong lineno; /* line number in above file */
Eprog funcdef; /* function definition */
};

View File

@ -429,6 +429,16 @@
1:Skip assignment from DEBUG trap
>5 three
fn() {
setopt localtraps localoptions debugbeforecmd
trap 'print $LINENO' DEBUG
[[ a = a ]] && print a is ok
}
fn
0:line numbers of complex sublists
>3
>a is ok
%clean
rm -f TRAPEXIT