about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2001-09-25 12:50:45 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-09-25 12:50:45 +0000
commitae9c181d6ba34c4f9db425f22b642c7bd22e4a79 (patch)
tree4d80cfe28f150cfd6fa4d154c704fc03727f342d
parentad65621e60f637470d166657c6bc4a592533b199 (diff)
downloadzsh-ae9c181d6ba34c4f9db425f22b642c7bd22e4a79.tar.gz
zsh-ae9c181d6ba34c4f9db425f22b642c7bd22e4a79.tar.xz
zsh-ae9c181d6ba34c4f9db425f22b642c7bd22e4a79.zip
15869
-rw-r--r--ChangeLog5
-rw-r--r--Src/text.c7
2 files changed, 5 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 47181eb65..60ca41dc9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,9 +1,6 @@
 2001-09-25  Sven Wischnowsky  <wischnow@zsh.org>
 
-	* 15868: Src/text.c: job text building code couldn't handle
-	empty sublists (as in `coproc || test')
-
-	* 15868: Src/text.c: job text building code couldn't handle
+	* 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>
diff --git a/Src/text.c b/Src/text.c
index 73b409e02..ddb4b8a2a 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: