Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Problem with ZLS_COLOURS (zsh-3.1.6-test-2)
- X-seq: zsh-workers 7237
- From: Thomas Köhler <jean-luc@xxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: Problem with ZLS_COLOURS (zsh-3.1.6-test-2)
- Date: Wed, 21 Jul 1999 15:13:58 +0200
- In-reply-to: <199907211001.MAA02739@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>; from Sven Wischnowsky on Wed, Jul 21, 1999 at 12:01:34PM +0200
- Mail-followup-to: zsh-workers@xxxxxxxxxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <199907211001.MAA02739@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
>
> Thomas Koehler wrote:
>
> > Ah. I think the problem is the first few matches that fit in the "normal
> > file" highlightning. After the first directory name, everything is OK,
> > before, it isn't.
>
> This is the kind of bug I would expect without the second part of
> 7220. Have you tried it?
Uhm, I missed it (hit the delete key too soon in my mailbox?). Here goes
my comment:
Your patch:
| diff -u os/Zle/complist.c Src/Zle/complist.c
| --- os/Zle/complist.c Tue Jul 20 08:54:18 1999
| +++ Src/Zle/complist.c Tue Jul 20 13:01:05 1999
| @@ -159,17 +159,15 @@
| n = ++s;
| while (*s && *s != '=')
| s++;
| - if (!*s )
| + if (!*s)
| return s;
| *s++ = '\0';
| p = getcolval(s);
| - if (*n) {
| - ec = (Extcol) zhalloc(sizeof(*ec));
| - ec->ext = n;
| - ec->col = s;
| - ec->next = c->exts;
| - c->exts = ec;
| - }
| + ec = (Extcol) zhalloc(sizeof(*ec));
| + ec->ext = n;
| + ec->col = s;
| + ec->next = c->exts;
| + c->exts = ec;
This part of the patch causes *ALL* matches to be highlighted in cyan,
even directories. If I don't apply this part but the part down there,
all works as expected.
| if (*p)
| *p++ = '\0';
| return p;
| @@ -460,6 +458,7 @@
| }
| }
| /* Now print the matches. */
| + last_col = COL_NO - 1;
This is the part that makes everything work.
| g = amatches;
| while (g) {
| char **pp = g->ylist;
So, the whole problem is solved by a oneliner. The line
last_col = COL_NO - 1;
was missing.
> Bye
> Sven
Thanks,
Thomas [happy now]
--
Thomas Köhler Email: jean-luc@xxxxxxxxxxxxxxxxx
<>< WWW: http://home.pages.de/~jeanluc/
IRC: jeanluc
LCARS --- Linux for Computers on All Real Starships
Messages sorted by:
Reverse Date,
Date,
Thread,
Author