Comment 5 for bug 1852782

Revision history for this message
Mike Rylander (mrylander) wrote :

IIRC, the reason I did it the way I did is that if you make a change to 245a, then 100a (without moving the cursor), then press ctrl-z a few times it only undoes the edits to 100a and does not "jump back" to undoing the 245a edits. I recall that specifically being an "issue" -- the whole record should be treated as a unit, and undo/redo should "just work". Of course, a side effect of the implementation was that /all/ edits of any type are kept in a single stack, which is nice when you look at it that way.

As you say, the tradeoff is that each edit is actually an edit, and has to be undone individually. Could we perhaps handle it a bit differently? If we record the field we're editing, and the edit amounts to just inserting or removing characters, just replace the most recent element on the stack so that the editing of a field is compacted down in the way that the native functionality acts? That would mean a single ctrl-z to undo all changes to a field when the context field stays the same.

Thoughts?