Undo/Redo full patch, squashed to ease rebase