diff options
Diffstat (limited to 'Src')
-rw-r--r-- | Src/Zle/complist.c | 30 |
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; |