Support selection undo/redo.