From 3807c902a23ea8b8e673103dff49d3d27a551756 Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Tue, 22 Jan 2002 10:22:47 +0000 Subject: add new generic fake style and changes to the C-code for that (different implementation of compadd -x) (16483) --- Src/Zle/compresult.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'Src/Zle/compresult.c') 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; -- cgit 1.4.1