Simon
I'm implementing a partial version of UndoManager myself, as I see it to
be rather useful. I'm interpreting clearUndo as clearing any undo
actions, so Ctrl+z will not do anything anymore. The spec states that
clearUndo resets the position to 0, but is this the wrong way round?
Since position increments whenever we undo, I would think that position
should be set to the undo stack's length - 1.