Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Undo is also confused with narrow-to-region
- X-seq: zsh-workers 35679
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- Subject: Re: Undo is also confused with narrow-to-region
- Date: Fri, 3 Jul 2015 20:12:13 +0200
- Cc: Zsh workers <zsh-workers@xxxxxxx>
- 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==
- In-reply-to: <8242.1435937191@thecus.kiddle.eu>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <8242.1435937191@thecus.kiddle.eu>
On Fri, Jul 3, 2015 at 5:26 PM, Oliver Kiddle <okiddle@xxxxxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author