about summary refs log tree commit diff
path: root/Src/Zle/compresult.c
diff options
context:
space:
mode:
authorGeoff Wing <gcw@users.sourceforge.net>2005-04-22 02:46:40 +0000
committerGeoff Wing <gcw@users.sourceforge.net>2005-04-22 02:46:40 +0000
commite71c9f6c01f1afa1aae991fca315e80b8647fc4f (patch)
treecaaa2afce3b25e054a8b2110d696244dfc959639 /Src/Zle/compresult.c
parente725a7b99831e952ebeda82744f28afb86737f5e (diff)
downloadzsh-e71c9f6c01f1afa1aae991fca315e80b8647fc4f.tar.gz
zsh-e71c9f6c01f1afa1aae991fca315e80b8647fc4f.tar.xz
zsh-e71c9f6c01f1afa1aae991fca315e80b8647fc4f.zip
20162: in printlist() don't output new line if we haven't printed anything
Diffstat (limited to 'Src/Zle/compresult.c')
-rw-r--r--Src/Zle/compresult.c7
1 files changed, 3 insertions, 4 deletions
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) {