summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorBart Schaefer <barts@users.sourceforge.net>2008-08-06 02:21:01 +0000
committerBart Schaefer <barts@users.sourceforge.net>2008-08-06 02:21:01 +0000
commit16e75d6978157eea40967c3b731091a32ced6339 (patch)
treeb7684a4ebac8c750baae497a386dcac37004f40d /Src
parent21d757f50f67653d06c798367e50288d6a95917e (diff)
downloadzsh-16e75d6978157eea40967c3b731091a32ced6339.tar.gz
zsh-16e75d6978157eea40967c3b731091a32ced6339.tar.xz
zsh-16e75d6978157eea40967c3b731091a32ced6339.zip
25389: rearrange precedence of ZLS_COLORS alternatives.
Diffstat (limited to 'Src')
-rw-r--r--Src/Zle/complist.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/Src/Zle/complist.c b/Src/Zle/complist.c
index de4b493c7..cd205692c 100644
--- a/Src/Zle/complist.c
+++ b/Src/Zle/complist.c
@@ -878,6 +878,21 @@ putfilecol(char *group, char *n, mode_t m, int special)
     Extcol ec;
     Patcol pc;
 
+    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]) {
+		patcols = pc->cols;
+
+		return 1;
+	    }
+	    zlrputs(pc->cols[0]);
+
+	    return 0;
+	}
+
     if (special != -1) {
 	colour = special;
     } else if (S_ISDIR(m)) {
@@ -920,21 +935,6 @@ putfilecol(char *group, char *n, mode_t m, int special)
 	    return 0;
 	}
 
-    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]) {
-		patcols = pc->cols;
-
-		return 1;
-	    }
-	    zlrputs(pc->cols[0]);
-
-	    return 0;
-	}
-
     zcputs(group, COL_FI);
 
     return 0;