zsh-workers
 help / color / mirror / code / Atom feed
* Rather bad bug in 4.2.0 zle-line-init
@ 2004-03-21  0:49 Bart Schaefer
  0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2004-03-21  0:49 UTC (permalink / raw)
  To: zsh-workers

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 match
  echo not[a]pattern(that)matches{anything}
}
zle -N zle-line-init


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Rather bad bug in 4.2.0 zle-line-init
@ 2004-03-22 19:59 Peter Stephenson
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Stephenson @ 2004-03-22 19:59 UTC (permalink / raw)
  To: zsh-workers

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@pwstephenson.fsnet.co.uk>
Work: pws@csr.com
Web: http://www.pwstephenson.fsnet.co.uk


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-03-22 19:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-21  0:49 Rather bad bug in 4.2.0 zle-line-init Bart Schaefer
2004-03-22 19:59 Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).