zsh-users
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.w.stephenson@ntlworld.com>
To: zsh-users@zsh.org
Subject: Re: Completion lists
Date: Fri, 16 Sep 2011 22:07:16 +0100	[thread overview]
Message-ID: <20110916220716.57cfd0f4@pws-pc.ntlworld.com> (raw)
In-Reply-To: <20110916220412.44f3191c@pws-pc.ntlworld.com>

Or even this?

Index: Src/Zle/complist.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/complist.c,v
retrieving revision 1.127
diff -p -u -r1.127 complist.c
--- Src/Zle/complist.c	19 Jun 2011 16:26:11 -0000	1.127
+++ Src/Zle/complist.c	16 Sep 2011 21:06:08 -0000
@@ -849,9 +849,9 @@ putmatchcol(char *group, char *n)
 {
     Patcol pc;
 
-    nrefs = MAX_POS - 1;
+    for (pc = mcolors.pats; pc; pc = pc->next) {
+	nrefs = MAX_POS - 1;
 
-    for (pc = mcolors.pats; pc; pc = pc->next)
 	if ((!pc->prog || !group || pattry(pc->prog, group)) &&
 	    pattryrefs(pc->pat, n, -1, -1, 0, &nrefs, begpos, endpos)) {
 	    if (pc->cols[1]) {
@@ -863,6 +863,7 @@ putmatchcol(char *group, char *n)
 
 	    return 0;
 	}
+    }
 
     zcputs(group, COL_NO);
 
@@ -880,9 +881,9 @@ putfilecol(char *group, char *filename, 
     Patcol pc;
     int len;
 
-    nrefs = MAX_POS - 1;
+    for (pc = mcolors.pats; pc; pc = pc->next) {
+	nrefs = MAX_POS - 1;
 
-    for (pc = mcolors.pats; pc; pc = pc->next)
 	if ((!pc->prog || !group || pattry(pc->prog, group)) &&
 	    pattryrefs(pc->pat, filename, -1, -1, 0, &nrefs, begpos, endpos)) {
 	    if (pc->cols[1]) {
@@ -894,6 +895,7 @@ putfilecol(char *group, char *filename, 
 
 	    return 0;
 	}
+    }
 
     if (special != -1) {
 	colour = special;

-- 
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/


  reply	other threads:[~2011-09-16 21:07 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-13 12:54 Yuri DElia
2011-09-13 14:43 ` Bart Schaefer
2011-09-13 15:16   ` Yuri DElia
2011-09-13 16:07     ` Yuri DElia
2011-09-13 17:40       ` Bart Schaefer
2011-09-13 18:48         ` Yuri DElia
2011-09-16 21:04         ` Peter Stephenson
2011-09-16 21:07           ` Peter Stephenson [this message]
2011-09-13 16:29     ` Bart Schaefer
2011-09-13 17:11       ` Yuri DElia
2011-09-18 13:41   ` Yuri DElia
2011-09-18 13:48     ` Mikael Magnusson
     [not found]       ` <ed790212f803298ea33fd6091b9d5062@thregr.org>
2011-09-18 14:08         ` Mikael Magnusson
2011-09-18 14:35           ` Yuri D'Elia
2011-09-16 21:58 ` Tomasz Pala

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=20110916220716.57cfd0f4@pws-pc.ntlworld.com \
    --to=p.w.stephenson@ntlworld.com \
    --cc=zsh-users@zsh.org \
    /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).