mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-12-06 17:51:18 +01: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]"
|
local val nm="$compstate[nmatches]"
|
||||||
|
|
||||||
if zstyle -a ":completion${curcontext}:$1" list-colors val; then
|
if zstyle -a ":completion${curcontext}:$1" list-colors val; then
|
||||||
|
zmodload -e zsh/complist || zmodload -i zsh/complist
|
||||||
if [[ "$1" = default ]]; then
|
if [[ "$1" = default ]]; then
|
||||||
ZLS_COLORS="${(j.:.)${(@)val:gs/:/\\\:}}"
|
ZLS_COLORS="${(j.:.)${(@)val:gs/:/\\\:}}"
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -453,13 +453,13 @@ initiscol(Listcols c)
|
||||||
curisbeg = curisend = 0;
|
curisbeg = curisend = 0;
|
||||||
|
|
||||||
for (i = nrefs; i < MAX_POS; i++)
|
for (i = nrefs; i < MAX_POS; i++)
|
||||||
begpos[i] = -1, endpos[i] = 0xfffffff;
|
begpos[i] = endpos[i] = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
doiscol(Listcols c, int pos)
|
doiscol(Listcols c, int pos)
|
||||||
{
|
{
|
||||||
if (pos > endpos[curisend]) {
|
if (endpos[curisend] >= 0 && pos > endpos[curisend]) {
|
||||||
curisend++;
|
curisend++;
|
||||||
if (curiscol) {
|
if (curiscol) {
|
||||||
zcputs(c, NULL, COL_NO);
|
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)))
|
else if (mselect >= 0 && (m->flags & (CMF_MULT | CMF_FMULT)))
|
||||||
zcputs(&mcolors, g->name, COL_DU);
|
zcputs(&mcolors, g->name, COL_DU);
|
||||||
else if (buf)
|
else if (buf)
|
||||||
subcols = putfilecol(&mcolors, g->name, path, buf->st_mode);
|
subcols = putfilecol(&mcolors, g->name, m->str, buf->st_mode);
|
||||||
else
|
else
|
||||||
subcols = putmatchcol(&mcolors, g->name, (m->disp ? m->disp : m->str));
|
subcols = putmatchcol(&mcolors, g->name, (m->disp ? m->disp : m->str));
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue