Add marker support to undo manager