about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>2000-01-24 14:06:53 +0000
committerTanaka Akira <akr@users.sourceforge.net>2000-01-24 14:06:53 +0000
commit686b08fd4e89f636caacadef9f6943f40e35580f (patch)
tree9b891730540ee1ada9846bbd75bcc796154c5b99
parentc35ee6b885a5230921bbf4fb128f4cc838c1219c (diff)
downloadzsh-686b08fd4e89f636caacadef9f6943f40e35580f.tar.gz
zsh-686b08fd4e89f636caacadef9f6943f40e35580f.tar.xz
zsh-686b08fd4e89f636caacadef9f6943f40e35580f.zip
zsh-workers/9416
-rw-r--r--Completion/Core/_setup1
-rw-r--r--Src/Zle/complist.c6
2 files changed, 4 insertions, 3 deletions
diff --git a/Completion/Core/_setup b/Completion/Core/_setup
index fa1495ced..4054f5ecc 100644
--- a/Completion/Core/_setup
+++ b/Completion/Core/_setup
@@ -3,6 +3,7 @@
 local val nm="$compstate[nmatches]"
 
 if zstyle -a ":completion${curcontext}:$1" list-colors val; then
+  zmodload -e zsh/complist || zmodload -i zsh/complist
   if [[ "$1" = default ]]; then
     ZLS_COLORS="${(j.:.)${(@)val:gs/:/\\\:}}"
   else
diff --git a/Src/Zle/complist.c b/Src/Zle/complist.c
index ce00ed240..39eee8b85 100644
--- a/Src/Zle/complist.c
+++ b/Src/Zle/complist.c
@@ -453,13 +453,13 @@ initiscol(Listcols c)
     curisbeg = curisend = 0;
 
     for (i = nrefs;  i < MAX_POS; i++)
-	begpos[i] = -1, endpos[i] = 0xfffffff;
+	begpos[i] = endpos[i] = -1;
 }
 
 static void
 doiscol(Listcols c, int pos)
 {
-    if (pos > endpos[curisend]) {
+    if (endpos[curisend] >= 0 && pos > endpos[curisend]) {
 	curisend++;
 	if (curiscol) {
 	    zcputs(c, NULL, COL_NO);
@@ -700,7 +700,7 @@ clprintm(Cmgroup g, Cmatch *mp, int mc, int ml, int lastc, int width,
 	else if (mselect >= 0 && (m->flags & (CMF_MULT | CMF_FMULT)))
 	    zcputs(&mcolors, g->name, COL_DU);
 	else if (buf)
-	    subcols = putfilecol(&mcolors, g->name, path, buf->st_mode);
+	    subcols = putfilecol(&mcolors, g->name, m->str, buf->st_mode);
 	else
 	    subcols = putmatchcol(&mcolors, g->name, (m->disp ? m->disp : m->str));