summaryrefslogtreecommitdiff
path: root/Src/text.c
diff options
context:
space:
mode:
authorAxel Beckert <abe@deuxchevaux.org>2020-02-14 01:58:20 +0100
committerAxel Beckert <abe@deuxchevaux.org>2020-02-14 01:58:20 +0100
commitbfc5d42735c1660263904ec5254cccf539a0a458 (patch)
tree9bbb81b4a53941427e6f9e65ae55027d9108df8c /Src/text.c
parent74561cc51b8867e43cb2937ab2edfb36e2a829bf (diff)
parent643de931640e01aa246723d2038328ef33737965 (diff)
downloadzsh-bfc5d42735c1660263904ec5254cccf539a0a458.tar.gz
zsh-bfc5d42735c1660263904ec5254cccf539a0a458.zip
Merge tag 'zsh-5.7.1-test-3' into debian
Test release: 5.7.1-test-3
Diffstat (limited to 'Src/text.c')
-rw-r--r--Src/text.c11
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...
*/