Broke up with my boyfriend

I just broke up with my boyfriend tonight.. I realized my worth. He would be on Facebook for hours and not talk to me he would make the excuse “I’m on Facebook liking pictures of my niece that’s all”. He would turn off his location all the time and when I asked him he would say “it turns off automatically” and he would go days without talking to me. I know I’m probably being sensitive and emotional, so do you girls think I did the right thing?