about summary refs log tree commit diff
path: root/Src/Zle
diff options
context:
space:
mode:
Diffstat (limited to 'Src/Zle')
-rw-r--r--Src/Zle/complist.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/Src/Zle/complist.c b/Src/Zle/complist.c
index 0d88cdc5c..00d1fb954 100644
--- a/Src/Zle/complist.c
+++ b/Src/Zle/complist.c
@@ -614,6 +614,8 @@ putfilecol(Listcols c, char *group, char *n, mode_t m)
     return 0;
 }
 
+static Cmgroup last_group;
+
 static void
 clprintm(Cmgroup g, Cmatch *mp, int mc, int ml, int lastc, int width,
 	 char *path, struct stat *buf)
@@ -621,8 +623,13 @@ clprintm(Cmgroup g, Cmatch *mp, int mc, int ml, int lastc, int width,
     Cmatch m;
     int len, subcols = 0;
 
+    if (g != last_group)
+        *last_cap = '\0';
+
+    last_group = g;
+
     if (!mp) {
-	zcputs(&mcolors, g->name, COL_MI);
+	zcputs(&mcolors, g->name, COL_SP);
 	len = width - 2;
 	while (len-- > 0)
 	    putc(' ', shout);