Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Undo is also confused with narrow-to-region



On Wed, 08 Jul 2015 16:57:33 +0200
Oliver Kiddle <okiddle@xxxxxxxxxxx> wrote:
> Peter wrote:
> > 
> > The example I've given shows an explicit save and restore.  It should
> > also be possible to use the double function scope trick, though I didn't
> > actually try.
> > 
> > I haven't imposed any arbitrary limits on the value in UNDO_LIMIT_NO as,
> > on thinking about it, it seemed to create hostages to fortune for no
> > obvious gain.
> 
> Thanks. Trying to apply this in read-from-minibuffer, I found that it
> was necessary to add a split-undo in after the BUFFER etc were setup,
> otherwise it was possible to do one initial undo. Also, I wonder if the
> if condition should do a return 1 rather than break so that it beeps -
> consistently with an undo that has reached the very first change. Or is
> the setlastline() call needed?

Finally committed.  I don't see that you'd need setlastline() if you
tried a single undo interactively and it failed, so it ought to be OK to
return 1.

pws



Messages sorted by: Reverse Date, Date, Thread, Author