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

Re: Weird completion bug in Src/Zle/compmatch.c#bld_line



What you are getting is not a mystery at all, but may give some hint.

In your patch:

 	    if (!ms)
+                closelog();
 		return 0;	/* Didn't match, give up */

but you need a block { .. } here, as follows:

 	    if (!ms) {
                closelog();
 		return 0;	/* Didn't match, give up */
	    }


If you use your patch, the function returns 0 even if ms is not NULL.
In the original code, the function returns 0 if ms is NULL and llen is 0;
otherwise it returns rl.

I guess your journey continues...



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