1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-29 19:00:57 +02:00

zsh-workers/9746

This commit is contained in:
Tanaka Akira 2000-02-15 12:24:59 +00:00
parent 5096ed276a
commit 767eb17ee0

View file

@ -1837,7 +1837,7 @@ ccmakehookfn(Hookdef dummy, struct ccmakedat *dat)
for (n = firstnode(ccused); n; incnode(n)) for (n = firstnode(ccused); n; incnode(n))
addlinknode(lastccused, getdata(n)); addlinknode(lastccused, getdata(n));
} LASTALLOC; } LASTALLOC;
} else } else if (ccused)
for (n = firstnode(ccused); n; incnode(n)) for (n = firstnode(ccused); n; incnode(n))
if (((Compctl) getdata(n)) != &cc_dummy) if (((Compctl) getdata(n)) != &cc_dummy)
freecompctl((Compctl) getdata(n)); freecompctl((Compctl) getdata(n));
@ -2497,6 +2497,8 @@ static void
makecomplistcc(Compctl cc, char *s, int incmd) makecomplistcc(Compctl cc, char *s, int incmd)
{ {
cc->refc++; cc->refc++;
if (!ccused)
ccused = newlinklist();
addlinknode(ccused, cc); addlinknode(ccused, cc);
ccont = 0; ccont = 0;
@ -2955,11 +2957,13 @@ makecomplistflags(Compctl cc, char *s, int incmd, int compadd)
ccont |= (cc->mask2 & (CC_CCCONT | CC_DEFCONT | CC_PATCONT)); ccont |= (cc->mask2 & (CC_CCCONT | CC_DEFCONT | CC_PATCONT));
if (incompfunc != 1 && findnode(ccstack, cc)) if (incompfunc != 1 && ccstack && findnode(ccstack, cc))
return; return;
MUSTUSEHEAP("complistflags"); MUSTUSEHEAP("complistflags");
if (!ccstack)
ccstack = newlinklist();
addlinknode(ccstack, cc); addlinknode(ccstack, cc);
if (incompfunc != 1 && allccs) { if (incompfunc != 1 && allccs) {