From d9544f55dab0d825c59b9a4100ac2d97a9427569 Mon Sep 17 00:00:00 2001 From: Paul Ackersviller Date: Tue, 29 May 2007 02:46:46 +0000 Subject: Merge of 20162: in printlist() don't output new line if we haven't printed anything. --- Src/Zle/compresult.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'Src') diff --git a/Src/Zle/compresult.c b/Src/Zle/compresult.c index 213189f11..ae7b3a3d0 100644 --- a/Src/Zle/compresult.c +++ b/Src/Zle/compresult.c @@ -1855,8 +1855,7 @@ printlist(int over, CLPrintFunc printm, int showall) if (tccan(TCCLEAREOD)) tcout(TCCLEAREOD); } - g = amatches; - while (g) { + for (g = amatches; g; g = g->next) { char **pp = g->ylist; if ((e = g->expls)) { @@ -2023,10 +2022,10 @@ printlist(int over, CLPrintFunc printm, int showall) p = skipnolist(p + 1, showall); } } - } + } else + continue; if (g->lcount || (showall && g->mcount)) pnl = 1; - g = g->next; } lastlistlen = 0; if (clearflag) { -- cgit 1.4.1