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:
parent
d19602a65a
commit
b41c26d78a
|
@ -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
|
||||
|
|
|
@ -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]);
|
||||
}
|
||||
|
|
|
@ -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 */
|
||||
};
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue