Dateing

So I dated this guy I had known since middle school he had a baby on the way with his ex and told me if his ex ever wanted to get back together he'd leave me. I never thought it would happen knowing their history and low and behold it happened the day she found out we where together. Then shortly after I began an affair with him and I knew it wasn't right but I still loved him and she soon found out and kicked him out and now we're back living together but he's still telling me if she wants to be with him ever again he'd leave me again. What should I do? I love him and don't want to loose him as a friend and we're not 100% together because he's still chaseing his baby Mama on and off and sometimes I feel like he hates me for what we did breaking up his family then other times I feel like he wants me and doesn't want anything to do with his son and baby Mama. It's so confusing.