mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-26 05:51:08 +02:00
zsh-workers/9416
This commit is contained in:
parent
c35ee6b885
commit
686b08fd4e
2 changed files with 4 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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));
|
||||
|
||||
|
|
Loading…
Reference in a new issue