summaryrefslogtreecommitdiff
path: root/Src/Zle/compresult.c
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2002-01-22 10:22:47 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2002-01-22 10:22:47 +0000
commit3807c902a23ea8b8e673103dff49d3d27a551756 (patch)
tree86b980265165cb7dd5d2710c936cb1c1a1c8fccf /Src/Zle/compresult.c
parentf463b09b133f8c798750334558b99d633c1a2219 (diff)
downloadzsh-3807c902a23ea8b8e673103dff49d3d27a551756.tar.gz
zsh-3807c902a23ea8b8e673103dff49d3d27a551756.zip
add new generic fake style and changes to the C-code for that (different implementation of compadd -x) (16483)
Diffstat (limited to 'Src/Zle/compresult.c')
-rw-r--r--Src/Zle/compresult.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/Src/Zle/compresult.c b/Src/Zle/compresult.c
index 13b9edd72..44a40f0fb 100644
--- a/Src/Zle/compresult.c
+++ b/Src/Zle/compresult.c
@@ -1494,10 +1494,12 @@ calclist(int showall)
}
if ((e = g->expls)) {
while (*e) {
- if ((*e)->count &&
+ if (((*e)->count || (*e)->always) &&
(!onlyexpl ||
- (onlyexpl & ((*e)->count > 0 ? 1 : 2))))
- nlines += 1 + printfmt((*e)->str, (*e)->count, 0, 1);
+ (onlyexpl & ((*e)->always > 0 ? 2 : 1))))
+ nlines += 1 + printfmt((*e)->str,
+ ((*e)->always ? -1 : (*e)->count),
+ 0, 1);
e++;
}
}
@@ -1840,9 +1842,9 @@ printlist(int over, CLPrintFunc printm, int showall)
int l;
while (*e) {
- if ((*e)->count &&
+ if (((*e)->count || (*e)->always) &&
(!listdat.onlyexpl ||
- (listdat.onlyexpl & ((*e)->count > 0 ? 1 : 2)))) {
+ (listdat.onlyexpl & ((*e)->always > 0 ? 2 : 1)))) {
if (pnl) {
putc('\n', shout);
pnl = 0;
@@ -1853,7 +1855,8 @@ printlist(int over, CLPrintFunc printm, int showall)
tcout(TCCLEAREOD);
}
}
- l = printfmt((*e)->str, (*e)->count, 1, 1);
+ l = printfmt((*e)->str,
+ ((*e)->always ? -1 : (*e)->count), 1, 1);
ml += l;
if (cl >= 0 && (cl -= l) <= 1) {
cl = -1;