Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: Re: Completion for mutt



I wrote:

> I just tried, too, and after the fix in the patch below, it works for
> me. What does `doesn't work' mean? Does it nothing?

Uh oh...

Bye
 Sven

diff -ru ../z.old/Src/Zle/compctl.c Src/Zle/compctl.c
--- ../z.old/Src/Zle/compctl.c	Tue Feb 15 11:32:51 2000
+++ Src/Zle/compctl.c	Tue Feb 15 13:15:03 2000
@@ -1837,7 +1837,7 @@
 		for (n = firstnode(ccused); n; incnode(n))
 		    addlinknode(lastccused, getdata(n));
 	    } LASTALLOC;
-	} else
+	} else if (ccused)
 	    for (n = firstnode(ccused); n; incnode(n))
 		if (((Compctl) getdata(n)) != &cc_dummy)
 		    freecompctl((Compctl) getdata(n));
@@ -2497,6 +2497,8 @@
 makecomplistcc(Compctl cc, char *s, int incmd)
 {
     cc->refc++;
+    if (!ccused)
+	ccused = newlinklist();
     addlinknode(ccused, cc);
 
     ccont = 0;
@@ -2955,11 +2957,13 @@
 
     ccont |= (cc->mask2 & (CC_CCCONT | CC_DEFCONT | CC_PATCONT));
 
-    if (incompfunc != 1 && findnode(ccstack, cc))
+    if (incompfunc != 1 && ccstack && findnode(ccstack, cc))
 	return;
 
     MUSTUSEHEAP("complistflags");
 
+    if (!ccstack)
+	ccstack = newlinklist();
     addlinknode(ccstack, cc);
 
     if (incompfunc != 1 && allccs) {

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author