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

Re: Rather bad bug in 4.2.0 zle-line-init



Bart Schaefer wrote:
> Make any sort of mistake in zle-line-init, and the editor goes into an
> infinite loop.
> 
> E.g. (be sure you can kill this shell from somewhere else):
> 
> zle-line-init() {
>   setopt localoptions nomatch
>   echo not[a]pattern(that)matches{anything}
> }
> zle -N zle-line-init

Easy fix.

Index: Src/Zle/zle_main.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_main.c,v
retrieving revision 1.40
diff -u -r1.40 zle_main.c
--- Src/Zle/zle_main.c	8 Mar 2004 11:44:14 -0000	1.40
+++ Src/Zle/zle_main.c	22 Mar 2004 19:46:15 -0000
@@ -835,6 +835,7 @@
 	args[1] = NULL;
 	execzlefunc(initthingy, args);
 	unrefthingy(initthingy);
+	errflag = retflag = 0;
     }
 
     zlecore();

-- 
Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxxxxx>
Work: pws@xxxxxxx
Web: http://www.pwstephenson.fsnet.co.uk



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