about summary refs log tree commit diff
path: root/Src/Zle
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>2000-03-01 14:03:20 +0000
committerTanaka Akira <akr@users.sourceforge.net>2000-03-01 14:03:20 +0000
commite6b92471a9cc2cc5502a39d98c5a48b2cafa54be (patch)
tree552a9b77fc6f287b98412331bae59724611351e1 /Src/Zle
parenta23aa1a00e7b89b025c3c0684b67fe0fde57cabb (diff)
downloadzsh-e6b92471a9cc2cc5502a39d98c5a48b2cafa54be.tar.gz
zsh-e6b92471a9cc2cc5502a39d98c5a48b2cafa54be.tar.xz
zsh-e6b92471a9cc2cc5502a39d98c5a48b2cafa54be.zip
zsh-workers/9953
Diffstat (limited to 'Src/Zle')
-rw-r--r--Src/Zle/complist.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/Src/Zle/complist.c b/Src/Zle/complist.c
index 24dce4aff..a7cab9807 100644
--- a/Src/Zle/complist.c
+++ b/Src/Zle/complist.c
@@ -403,7 +403,7 @@ static char *last_cap;
 static void
 zlrputs(Listcols c, char *cap)
 {
-    if (strcmp(last_cap, cap)) {
+    if (!*last_cap || strcmp(last_cap, cap)) {
 	VARARR(char, buf, lr_caplen + max_caplen + 1);
 
 	strcpy(buf, c->files[COL_LC]->col);
@@ -435,9 +435,10 @@ zcputs(Listcols c, char *group, int colour)
 static void
 zcoff(void)
 {
-    if (mcolors.files[COL_EC] && mcolors.files[COL_EC]->col)
+    if (mcolors.files[COL_EC] && mcolors.files[COL_EC]->col) {
 	tputs(mcolors.files[COL_EC]->col, 1, putshout);
-    else
+	*last_cap = '\0';
+    } else
 	zcputs(&mcolors, NULL, COL_NO);
 }