diff options
Diffstat (limited to 'Src/text.c')
-rw-r--r-- | Src/text.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Src/text.c b/Src/text.c index 3658b1bc6..69530ae79 100644 --- a/Src/text.c +++ b/Src/text.c @@ -470,8 +470,13 @@ gettext2(Estate state) " || " : " && "); s->code = *state->pc++; s->pop = (WC_SUBLIST_TYPE(s->code) == WC_SUBLIST_END); - if (WC_SUBLIST_FLAGS(s->code) & WC_SUBLIST_NOT) - taddstr("! "); + if (WC_SUBLIST_FLAGS(s->code) & WC_SUBLIST_NOT) { + if (WC_SUBLIST_SKIP(s->code) == 0) + stack = 1; + taddstr((stack || (!(WC_SUBLIST_FLAGS(s->code) & + WC_SUBLIST_SIMPLE) && wc_code(*state->pc) != + WC_PIPE)) ? "!" : "! "); + } if (WC_SUBLIST_FLAGS(s->code) & WC_SUBLIST_COPROC) taddstr("coproc "); } @@ -579,7 +584,7 @@ gettext2(Estate state) state->pc = end; if (!nargs) { /* - * Unnamed fucntion. + * Unnamed function. * We're not going to pull any arguments off * later, so skip them now... */ |