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 35701
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: Zsh workers <zsh-workers@xxxxxxx>
- Subject: Re: Undo is also confused with narrow-to-region
- Date: Mon, 06 Jul 2015 13:46:25 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1436183186; bh=A4kt89SQb2EoxdkSMXlMYk7APWRev2zJ5KLRXv1cPMU=; h=In-reply-to:From:References:To:Subject:Date:From:Subject; b=TLJZt3KHHp0O+UPNOacqO7kM1IgcNyr/Yhda6aos/airj1OjusZ4NYalFFHxqJnR3U0XYicZTXexV/rnkedkmw6Qt/T5sy5lsBCCy7nER78WlWhXlI/gOyx7vrCiGax7TEOuBZLKGRaHEwzpArVQ7h3aWG/iFakr9qzrGAT41pviqEJVRGShkmcf7rzUsdP5e1Zmds3cX91RVIVeGMszbLF0leCnhMs5pIbI0+7tRJxzu3wYeh9BBIaDsx7YWk58j4Ila8NIqvKZbcYq3Bi/RcpBxRE31aPjHElWZUuNtA0xMT/Eltds/1SAn7MVV3m3pYE0IWlibX/vX07JO+1+qw==
- In-reply-to: <20150706093957.33d9cb25@pwslap01u.europe.root.pri>
- 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> <CAHYJk3T_a=TAjVr6e79x8bOh6u+vWO9aDXS=fNNHbm7XejLP_A@mail.gmail.com> <20150706093957.33d9cb25@pwslap01u.europe.root.pri>
Peter wrote:
> > 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.
>
> You can already basically do this: see read-from-minibuffer.
>
> integer changeno=$UNDO_CHANGE_NO
...
> zle undo $changeno
That prevents redoing minibuffer changes from the main editor but
doesn't stop you undoing main editor changes within the minibuffer. It
might be sufficient to mark the current undo state as a point beyond
which an undo will not go unless passed a change number as a parameter.
Or should we do that directly from recursive-edit?
Oliver
Messages sorted by:
Reverse Date,
Date,
Thread,
Author