Is clearUndo() in UndoManager the wrong way round?

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.

Simon

Received on Tuesday, 17 February 2015 08:05:25 UTC