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

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



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