undo (was Re: Why does Dynamic Typing really matter?!?)
Neil Hodgson
nhodgson at bigpond.net.au
Sat Feb 8 17:29:36 EST 2003
Edward K. Ream:
> Leo implements undo using the same "string of beads" model found in yellow
> box. It supports unlimited undo/redo in a very demanding environment,
i.e.,
> in an outliner in which a) outline nodes may be inserted, deleted, moved,
> sorted, etc., b) text corresponding to nodes may be changed and c) the two
> kinds of operations may be intermixed freely.
Does Leo support "scoped undo" where you select a subset of the document
and ask for changes to be undone only for that code?
I'd really like to offer this for Scintilla but can't figure out a good
way to do it. Most of my thinking has involved splitting the document into
3: prolog, changing, and epilog where the prolog and epilog are constant
texts outside the changing scope and the changing text is a copy of the
original document which is undone with markers to show which section is
published back into the user-viewable document. But then I try and work out
how to graft the undo histories together (so you can do a scoped undo on one
section then on another) and I get really lost.
Neil
More information about the Python-list
mailing list