From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5512 invoked by alias); 5 Mar 2015 04:46:46 -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: 34650 Received: (qmail 4243 invoked from network); 5 Mar 2015 04:46:33 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 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=pMVew2RRa4k+kmgI2/pOZuaf+K7czyRYzbIU5ykVdps=; b=IU1GZnkAoPx2WRhT8jNeR0RBlshE7MAewztvLXKqpaWkosb9JK2cRPlme7cP5z1sn+ 4DtRSW2OrDwYj8dfsZPynVtIR+F45x3pHpLhBLn2wF6mzjB5q/kI01HeL6/67W2czYtY yuLcicK3hk7mY+bFY2djwlxk/duUEI9y8rbjw60PEHv6VfH4GoCTs1WWMHhkgIgF3g0B 3LFioVPyfulXuXahxPLucr/myDIjkoWZlesig9Mt1t3H9Lq4hfWTME8BwGu+QRaaBQVl wZdpjawYgJ6/2M5ENS+7jFzyxnNcfn55dA5pV/8L9msMpexjcqup+I7yB7vgSEmFS54Y fUrA== X-Gm-Message-State: ALoCoQn/maRnp/10Q/p12rY57bDdl92sZCs8R6j0t5KAZRYYooruIJfLtUQfAGTYr25ExhW2HlKp X-Received: by 10.60.70.211 with SMTP id o19mr2571919oeu.21.1425530792524; Wed, 04 Mar 2015 20:46:32 -0800 (PST) From: Bart Schaefer Message-Id: <150304204628.ZM20125@torch.brasslantern.com> Date: Wed, 4 Mar 2015 20:46:28 -0800 In-Reply-To: Comments: In reply to Mikael Magnusson "Re: PATCH: Don't store ZLE_LINE_ABORTED in vared context" (Mar 5, 3:41am) References: <150304175726.ZM19828@torch.brasslantern.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh workers Subject: Re: PATCH: Don't store ZLE_LINE_ABORTED in vared context MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Mar 5, 3:41am, Mikael Magnusson wrote: } Subject: Re: PATCH: Don't store ZLE_LINE_ABORTED in vared context } } On Thu, Mar 5, 2015 at 2:57 AM, Bart Schaefer wrote: } > } annoying if you set up a widget to do the up-line-or-aborted, because } > } it will grab the vared text as a command then. } > } > Hrm, perhaps, but I believe the intent was to be able to hang on to } > whatever buffer was most recently being edited when the interrupt came } > through. } } So how should I handle this case in my shell widget then? Based on this: http://www.zsh.org/mla/workers/2010/msg00702.html I wonder if the solution is that zle-line-finish should be called even when the editor is aborted with send-break. However, you should be able to do something like zle-line-init() { if [[ $LAST_CONTEXT = vared ]] then unset ZLE_LINE_ABORTED else : your thing with ZLE_LINE_SAVED fi LAST_CONTEXT=$CONTEXT } } I think pws introduced the feature so maybe he can clarify. Look at http://www.zsh.org/mla/workers/2010/msg00681.html and then http://www.zsh.org/mla/workers/2010/msg00685.html ... > Hmm... I'm wondering if I put it in the right place. sendbreak can abort > other things than the full line edit, and I already claimed that "this > parameter is set by the line editor when an error occurs", which as you > spotted isn't necessarily true. I think the intent was to capture "other things than the full line edit" with ZLE_LINE_ABORT. But yes, let PWS weigh in.