From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28664 invoked by alias); 10 Sep 2015 15:09:53 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 36470 Received: (qmail 18398 invoked from network); 10 Sep 2015 15:09:53 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version:content-type; bh=bCKTqtX/aWzvb+yi51wIS97IvxjokcokikqJW8bTptA=; b=W9AyADnb6kdf4p006AYmwcezZAcaUdd8MAGzw9etFqvzCQ68OswBq+tPwGysRk3bfI eiIhxTSCkBtebbLZ5i9NCDYqCu0m9/7RxMmFeOHrCKgnBNVWyqlKvWdtemNPCU2UQ8Gq mXcatosiOVs2vhUk4jSlI2eA8NVzr2rSDkBewVR4JInMaHDAHFAtVsgrMfiSqbiboYYO ruJPwGPCYY0ZaboaieVv7SiqW7prcimOBrTOwonPX6SwYGJlLFf05mnh64zDig2FbVGs xcr2/m6XLRT59Qy5ZHxzDwlBhknBPSwgohFneA8pDifk6he0kq04KVleflhM5kpaQVpS letQ== X-Gm-Message-State: ALoCoQnurz9s3ZCyXIV1eHhkuxk/9648VcRqBrKdm7kExtUkAMFp7TsCNcpBR1Tjx5+MSqNuuaGk X-Received: by 10.202.94.195 with SMTP id s186mr32054193oib.92.1441897790993; Thu, 10 Sep 2015 08:09:50 -0700 (PDT) From: Bart Schaefer Message-Id: <150910080948.ZM22372@torch.brasslantern.com> Date: Thu, 10 Sep 2015 08:09:48 -0700 In-Reply-To: Comments: In reply to Mikael Magnusson "Re: Ctrl-c not working during correction with 5.1" (Sep 3, 5:00am) References: <20150901141031.GB423@x4> <150901111502.ZM2072@torch.brasslantern.com> <87wpw9vuek.fsf@gmail.com> <150902193229.ZM17927@torch.brasslantern.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh workers Subject: PATCH: Builtin exit from inside ZLE widget MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Sep 3, 5:00am, Mikael Magnusson wrote: } } % bindkey 0 e } % e() exit } % zle -N e } % ' } quote> 0 } } this prints the PS2 prompt indefinitely, ctrl-c is ignored and so is a } normal kill, I have to kill -9 from another shell to stop it. This seems to be it: diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c index e610ae1..ec3d2c3 100644 --- a/Src/Zle/zle_main.c +++ b/Src/Zle/zle_main.c @@ -1276,7 +1276,7 @@ zleread(char **lp, char **rp, int flags, int context, char *init, char *finish) alarm(0); freeundo(); - if (eofsent || errflag) { + if (eofsent || errflag || exit_pending) { s = NULL; } else { zleline[zlell++] = ZWC('\n'); There will be a final "unmatched '" reported in Mikael's specific example, but quashing that is an exercise that can wait.