Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Problem with ZLS_COLOURS (zsh-3.1.6-test-2)



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