From 01ffe47e012deb204dc74a3fff794f8b4a3ec795 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Thu, 24 Feb 2000 10:20:23 +0000 Subject: [PATCH] zsh-workers/9863 --- Src/parse.c | 6 +++--- Src/text.c | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Src/parse.c b/Src/parse.c index 85e70935f..fde25f106 100644 --- a/Src/parse.c +++ b/Src/parse.c @@ -1154,13 +1154,13 @@ par_if(int *complex) yylex(); if (tok == INBRACE && usebrace) { yylex(); - par_list(complex); + par_save_list(complex); if (tok != OUTBRACE) { cmdpop(); YYERRORV(oecused); } } else { - par_list(complex); + par_save_list(complex); if (tok != FI) { cmdpop(); YYERRORV(oecused); @@ -1507,7 +1507,7 @@ par_simple(int *complex, int nr) int c = 0; yylex(); - par_list(&c); + par_save_list(&c); if (tok != OUTBRACE) { cmdpop(); lineno += oldlineno; diff --git a/Src/text.c b/Src/text.c index cb0561a90..235064efc 100644 --- a/Src/text.c +++ b/Src/text.c @@ -269,7 +269,7 @@ gettext2(Estate state) taddstr("! "); if (WC_SUBLIST_FLAGS(code) & WC_SUBLIST_COPROC) taddstr("coproc "); - tpush(code, (WC_SUBLIST_TYPE(code) == WC_SUBLIST_END)); + s = tpush(code, (WC_SUBLIST_TYPE(code) == WC_SUBLIST_END)); } else { if (!(stack = (WC_SUBLIST_TYPE(code) == WC_SUBLIST_END))) { taddstr((WC_SUBLIST_TYPE(code) == WC_SUBLIST_OR) ? @@ -282,6 +282,8 @@ gettext2(Estate state) taddstr("coproc "); } } + if (!stack && (WC_SUBLIST_FLAGS(s->code) & WC_SUBLIST_SIMPLE)) + state->pc++; break; case WC_PIPE: if (!s) {