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

Re: ZLE 8-bit patch



Zefram writes:
> The i-search code is now a real mess.
> Someone should review/rewrite the code properly.

I'm fiddling with it now.  If anyone else is working on it, let me know.

Also, I discovered that your DEBUG code in zstrlen() isn't checking
the error condition correctly.  Here's a patch:

Index: utils.c
@@ -2936,11 +2936,12 @@
 
     for (l = 0; *s; l++)
 	if (*s++ == Meta) {
-	    s++;
 #ifdef DEBUG
 	    if (! *s)
 		fprintf(stderr, "BUG: unexpected end of string in ztrlen()\n");
+	    else
 #endif
+	    s++;
 	}
     return l;
 }

..wayne..




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