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

Re: describe-key-briefly crashes in cvs



Probably I should never have made unmetafying in place the default
behaviour for stringaszleline().

Index: Src/Zle/zle_refresh.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_refresh.c,v
retrieving revision 1.62
diff -u -r1.62 zle_refresh.c
--- Src/Zle/zle_refresh.c	26 Apr 2008 22:52:51 -0000	1.62
+++ Src/Zle/zle_refresh.c	29 Apr 2008 08:38:08 -0000
@@ -1418,8 +1418,9 @@
 
     if (statusline) {
 	int outll, outsz;
+	char *statusdup = ztrdup(statusline);
 	ZLE_STRING_T outputline =
-	    stringaszleline(statusline, 0, &outll, &outsz, NULL); 
+	    stringaszleline(statusdup, 0, &outll, &outsz, NULL); 
 
 	rpms.tosln = rpms.ln + 1;
 	nbuf[rpms.ln][winw + 1] = zr_zr;	/* text not wrapped */
@@ -1484,6 +1485,7 @@
 	    snextline(&rpms);
 	}
 	zfree(outputline, outsz);
+	free(statusdup);
     }
     *rpms.s = zr_zr;
 


-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070



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