From e6b92471a9cc2cc5502a39d98c5a48b2cafa54be Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Wed, 1 Mar 2000 14:03:20 +0000 Subject: zsh-workers/9953 --- Src/Zle/complist.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Src') 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); } -- cgit 1.4.1