From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16992 invoked by alias); 5 Mar 2015 02:41:32 -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: 34649 Received: (qmail 1330 invoked from network); 5 Mar 2015 02:41:30 -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.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=it5BB46MJ2pNbfyuIxAUPeaoSgABAkr1ss0HQKwUM7w=; b=O3iHCCLG+NSGnIDFO0FqUZ2fhuJNOl6paE6sMJuShMhNNZewC15jAz20FM4/L7Mkz5 YkIKbKG3KPZnkvXbLtvaTSL/vtNeVzS0bpbOOwWsEgLIJK0cCbyxkt7N0XLeP/W0FRbJ 92GkW6HuoPIezEYWllsymvGFNj7CRRoKNHTYitnGDYeDZtcnVH0VEF60UN6DJSD0RM2R iC+5wudjmgj9dweJbCMfQDl73qlTESJQy6toE8bVovugFogUJowAFApwKGCV9tP9OEst l8Gi9uXpv2F4QFZ0601NONhEuxlSRVcvE8Hc2DBZ7UGspLX7tmdzpm2MsamxJt7iCgD1 Dyiw== MIME-Version: 1.0 X-Received: by 10.107.153.193 with SMTP id b184mr17295010ioe.85.1425523288862; Wed, 04 Mar 2015 18:41:28 -0800 (PST) In-Reply-To: <150304175726.ZM19828@torch.brasslantern.com> References: <150304175726.ZM19828@torch.brasslantern.com> Date: Thu, 5 Mar 2015 03:41:28 +0100 Message-ID: Subject: Re: PATCH: Don't store ZLE_LINE_ABORTED in vared context From: Mikael Magnusson To: Bart Schaefer Cc: zsh workers Content-Type: text/plain; charset=UTF-8 On Thu, Mar 5, 2015 at 2:57 AM, Bart Schaefer wrote: > On Mar 4, 7:40pm, Mikael Magnusson wrote: > } Subject: PATCH: Don't store ZLE_LINE_ABORTED in vared context > } > } send-break (^G ESC-^G) (unbound) (unbound) > } Abort the current editor function, e.g. execute-named-command, or the > } editor itself, e.g. if you are in vared. Otherwise abort the parsing > } of the current line; in this case the aborted line is available in the > } shell variable ZLE_LINE_ABORTED. > } > } However, pressing ctrl-c inside vared stores whatever was being edited > } in ZLE_LINE_ABORTED, which the above seems to imply should not happen. > > Another documentation error rather than code error, IMO. > > } The following adjusts the code accordingly. It was actually a bit > } 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? I think pws introduced the feature so maybe he can clarify. (I won't push the commit in the meantime). -- Mikael Magnusson