undo/redo can save their context into ctx object
cache undo/redo data on Trail#replace