zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: PATCH: Re: Problem with ZLS_COLOURS (zsh-3.1.6-test-2)
Date: Tue, 20 Jul 1999 13:05:28 +0200 (MET DST)	[thread overview]
Message-ID: <199907201105.NAA01977@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: =?iso-8859-1?Q?Thomas_K=F6hler?='s message of Mon, 19 Jul 1999 19:00:28 +0200


Thomas Koehler wrote:

> I have a slight problem with ZLS_COLOURS - the colours aren't being used
> in all cases :-(
> I use this:
> ZLS_COLOURS="no=36;40:fi=36;40:di=32;40:ln=36;40:pi=31;40:so=22;40:bd=44;37:cd=44;37:ex=35;40:mi=36;40:lc=\e[:rc=m:ec=:ma=37;41:*=36;40"
>
> ...
>
> jean-luc@picard (ttyp5) ~> ls a<TAB>
> -> works, shows all 3 matches in cyan as desired
> 
> jean-luc@picard (ttyp5) ~> ls a<TAB>
> -> doesn't work, shows all 3 matches uncoloured
> 
> Any hints what goes wrong? Did I miss an option or is this really a bug?

This patch makes `*=...' be used (it was explicitly ignored, I don't
remember why did it -- maybe GNU-ls does it?).

And it also resets `last_col' before printing the list -- maybe I'm
getting blind, but maybe this was really missing.

Together (or either of them) may solve the problem -- could you please 
try it?

Bye
 Sven

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;
 	if (*p)
 	    *p++ = '\0';
 	return p;
@@ -460,6 +458,7 @@
 	}
     }
     /* Now print the matches. */
+    last_col = COL_NO - 1;
     g = amatches;
     while (g) {
 	char **pp = g->ylist;

--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


                 reply	other threads:[~1999-07-20 11:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199907201105.NAA01977@beta.informatik.hu-berlin.de \
    --to=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).