summaryrefslogtreecommitdiffstats
path: root/Src/parse.c
diff options
context:
space:
mode:
authorPeter Stephenson <p.w.stephenson@ntlworld.com>2017-09-04 21:36:46 +0100
committerPeter Stephenson <p.w.stephenson@ntlworld.com>2017-09-04 21:36:46 +0100
commit5a8155f7b7ab8f3cab1f95d4dba5ed49de0ab77c (patch)
tree93e954a473fa844062b61909c6f33d9406db231d /Src/parse.c
parent41621: _mkdir: Honour the 'command' and 'builtin' precommand modifiers. (diff)
downloadzsh-5a8155f7b7ab8f3cab1f95d4dba5ed49de0ab77c.tar
zsh-5a8155f7b7ab8f3cab1f95d4dba5ed49de0ab77c.tar.gz
zsh-5a8155f7b7ab8f3cab1f95d4dba5ed49de0ab77c.tar.bz2
zsh-5a8155f7b7ab8f3cab1f95d4dba5ed49de0ab77c.tar.lz
zsh-5a8155f7b7ab8f3cab1f95d4dba5ed49de0ab77c.tar.xz
zsh-5a8155f7b7ab8f3cab1f95d4dba5ed49de0ab77c.tar.zst
zsh-5a8155f7b7ab8f3cab1f95d4dba5ed49de0ab77c.zip
41633: Fix problem backgrounding function definitions.
Owing to being marked as simple sublists the instruction to background was ignored. This applied to anonymous functions.
Diffstat (limited to 'Src/parse.c')
-rw-r--r--Src/parse.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/Src/parse.c b/Src/parse.c
index 27052527d..6e0856bbc 100644
--- a/Src/parse.c
+++ b/Src/parse.c
@@ -808,8 +808,13 @@ par_sublist(int *cmplx)
WC_SUBLIST_END),
f, (e - 1 - p), c);
cmdpop();
- } else
+ } else {
+ if (tok == AMPER || tok == AMPERBANG) {
+ c = 1;
+ *cmplx |= c;
+ }
set_sublist_code(p, WC_SUBLIST_END, f, (e - 1 - p), c);
+ }
return 1;
} else {
ecused--;