From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8819 invoked by alias); 3 Jul 2015 18:12:19 -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: 35679 Received: (qmail 4180 invoked from network); 3 Jul 2015 18:12:16 -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=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.0 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=wmKqcrS5BJBF+b2jsx3TmUS8cCdrC8UplsvZ67cOgAA=; b=zi29ex2XLu/xqhOJVROW1IVQ04lYHonq8b3Nn+8lbkSR3tO31o89LE5JXdy4jJNSTu gXNVX0Y1HQj4B3tZvft61czku3ZmuDWje+XXPQZ+pxRohqHrYKdZZjOmxYjY/8/3RBz5 atVMX/tClon/5qMmy/vAERqoKOJtun32QNxyVcN3KkaZaBHDIenj5+YwOaG3mmeuiQZ3 mFPahXvb/pnyd6XnV8Yw5V2Ru4EghdCPf0JjR3D67J4h1ajPRHVR5etfwetz0HpWQqUk sbFaRYYld8gcmvfMgOO6KH9Axg+hIqgRYYvKOfXGDjQqr1rec5C0owuSGYuY3BWfEEH4 Grcg== MIME-Version: 1.0 X-Received: by 10.50.90.179 with SMTP id bx19mr51795217igb.43.1435947133480; Fri, 03 Jul 2015 11:12:13 -0700 (PDT) In-Reply-To: <8242.1435937191@thecus.kiddle.eu> References: <8242.1435937191@thecus.kiddle.eu> Date: Fri, 3 Jul 2015 20:12:13 +0200 Message-ID: Subject: Re: Undo is also confused with narrow-to-region From: Mikael Magnusson To: Oliver Kiddle Cc: Zsh workers Content-Type: text/plain; charset=UTF-8 On Fri, Jul 3, 2015 at 5:26 PM, Oliver Kiddle wrote: > Within narrow-to-region, undo will put back the full BUFFER that is then > duplicated from PREDISPLAY/POSTDISPLAY. After narrow-to-region, the > opposite problem occurs with the part that was not part of the BUFFER > being lost. > > This isn't that easy to solve. recursive-edit could save and restore the > undo structures but for some uses of recursive-edit, such as that shown > for it in the manual, that might not be the right thing anyway. Would it be possible to implement some kind of 'zle push-undo-stack' and 'zle pop-undo-stack'? If you push it you would get a whole new instance of undo, and popping it then throws all those entries away again. I can't really think of an instance outside recursive-edit where it would be useful, though. -- Mikael Magnusson