1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-28 05:00:59 +01:00

29633: more care with anonymous and other functions

This commit is contained in:
Peter Stephenson 2011-08-03 18:45:17 +00:00
parent 771b059a52
commit d48faef8cd
4 changed files with 30 additions and 5 deletions

View file

@ -1465,7 +1465,10 @@ par_funcdef(void)
ecssub = oecssub;
YYERRORV(oecused);
}
incmdpos = 0;
if (num == 0) {
/* Anonymous function, possibly with arguments */
incmdpos = 0;
}
zshlex();
} else if (unset(SHORTLOOPS)) {
lineno += oldlineno;
@ -1721,7 +1724,10 @@ par_simple(int *complex, int nr)
ecssub = oecssub;
YYERROR(oecused);
}
incmdpos = 0;
if (argc == 0) {
/* Anonymous function, possibly with arguments */
incmdpos = 0;
}
zshlex();
} else {
int ll, sl, c = 0;