diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2011-08-03 18:45:17 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2011-08-03 18:45:17 +0000 |
commit | d48faef8cdff3c7c63c0a9164443e3d337aa1ec1 (patch) | |
tree | e9096e7fc93bbfdcc8fbc751c6117976ad2c0189 /Src | |
parent | 771b059a526effbddb895fb041e30b3a5e038b48 (diff) | |
download | zsh-d48faef8cdff3c7c63c0a9164443e3d337aa1ec1.tar.gz zsh-d48faef8cdff3c7c63c0a9164443e3d337aa1ec1.tar.xz zsh-d48faef8cdff3c7c63c0a9164443e3d337aa1ec1.zip |
29633: more care with anonymous and other functions
Diffstat (limited to 'Src')
-rw-r--r-- | Src/parse.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Src/parse.c b/Src/parse.c index 5b8f0af48..e4d038b6e 100644 --- a/Src/parse.c +++ b/Src/parse.c @@ -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; |