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

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



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