From e71c9f6c01f1afa1aae991fca315e80b8647fc4f Mon Sep 17 00:00:00 2001 From: Geoff Wing Date: Fri, 22 Apr 2005 02:46:40 +0000 Subject: 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 c0a881b45..b07e71aff 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