From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25135 invoked from network); 21 Jul 1999 12:08:20 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 21 Jul 1999 12:08:20 -0000 Received: (qmail 1767 invoked by alias); 21 Jul 1999 12:08:08 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7237 Received: (qmail 1760 invoked from network); 21 Jul 1999 12:08:08 -0000 Date: Wed, 21 Jul 1999 15:13:58 +0200 From: =?iso-8859-1?Q?Thomas_K=F6hler?= To: zsh-workers@sunsite.auc.dk Subject: Re: Problem with ZLS_COLOURS (zsh-3.1.6-test-2) Message-ID: <19990721151358.B6054@picard.franken.de> Mail-Followup-To: zsh-workers@sunsite.auc.dk References: <199907211001.MAA02739@beta.informatik.hu-berlin.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Mailer: Mutt 0.95.4i In-Reply-To: <199907211001.MAA02739@beta.informatik.hu-berlin.de>; from Sven Wischnowsky on Wed, Jul 21, 1999 at 12:01:34PM +0200 X-Operating-System: Linux picard 2.2.10 X-Editor: VIM - Vi IMproved 5.4p BETA http://www.vim.org/ X-IRC: tirc-1.2; Nick: jeanluc X-URL: http://home.pages.de/~jeanluc/ Sven Wischnowsky wrote: >=20 > Thomas Koehler wrote: >=20 > > 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. >=20 > 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 =3D ++s; | while (*s && *s !=3D '=3D') | s++; | - if (!*s ) | + if (!*s) | return s; | *s++ =3D '\0'; | p =3D getcolval(s); | - if (*n) { | - ec =3D (Extcol) zhalloc(sizeof(*ec)); | - ec->ext =3D n; | - ec->col =3D s; | - ec->next =3D c->exts; | - c->exts =3D ec; | - } | + ec =3D (Extcol) zhalloc(sizeof(*ec)); | + ec->ext =3D n; | + ec->col =3D s; | + ec->next =3D c->exts; | + c->exts =3D 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++ =3D '\0'; | return p; | @@ -460,6 +458,7 @@ | } | } | /* Now print the matches. */ | + last_col =3D COL_NO - 1; This is the part that makes everything work. | g =3D amatches; | while (g) { | char **pp =3D g->ylist; So, the whole problem is solved by a oneliner. The line last_col =3D COL_NO - 1; was missing. > Bye > Sven Thanks, Thomas [happy now] --=20 Thomas K=F6hler Email: jean-luc@picard.franken.de <>< WWW: http://home.pages.de/~jeanluc/ IRC: jeanluc LCARS --- Linux for Computers on All Real Starships