diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2001-09-25 12:51:07 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2001-09-25 12:51:07 +0000 |
commit | e41d5e2d9dc4285cf42583410f2b4e143a7f2c33 (patch) | |
tree | 1eb6e3c4d51038523c59494f478a1871df1a06e0 | |
parent | 5322a5d68f01949c068a6632b29d3b57b093edd8 (diff) | |
download | zsh-e41d5e2d9dc4285cf42583410f2b4e143a7f2c33.tar.gz zsh-e41d5e2d9dc4285cf42583410f2b4e143a7f2c33.tar.xz zsh-e41d5e2d9dc4285cf42583410f2b4e143a7f2c33.zip |
15869
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Src/text.c | 7 |
2 files changed, 9 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog index 1e62dcecf..97fadfe4e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-09-25 Sven Wischnowsky <wischnow@zsh.org> + + * 15868, 15869: Src/text.c: job text building code couldn't handle + empty sublists (as in `coproc || test') + 2001-09-25 Clint Adams <clint@zsh.org> * 15866, Sven 15468: Completion/Unix/Command/_ssh: diff --git a/Src/text.c b/Src/text.c index 5920c00f6..d23cccdf6 100644 --- a/Src/text.c +++ b/Src/text.c @@ -274,8 +274,9 @@ gettext2(Estate state) break; case WC_SUBLIST: if (!s) { - if (wc_code(*state->pc) != WC_PIPE) - stack = 1; + if (!(WC_SUBLIST_FLAGS(code) & WC_SUBLIST_SIMPLE) && + wc_code(*state->pc) != WC_PIPE) + stack = -1; if (WC_SUBLIST_FLAGS(code) & WC_SUBLIST_NOT) taddstr(stack ? "!" : "! "); if (WC_SUBLIST_FLAGS(code) & WC_SUBLIST_COPROC) @@ -293,7 +294,7 @@ gettext2(Estate state) taddstr("coproc "); } } - if (!stack && (WC_SUBLIST_FLAGS(s->code) & WC_SUBLIST_SIMPLE)) + if (stack < 1 && (WC_SUBLIST_FLAGS(s->code) & WC_SUBLIST_SIMPLE)) state->pc++; break; case WC_PIPE: |