Is it flirting?

A guy I work with texts me to get his schedule. One day after he left he said “your hair looked pretty today.” I said “oh thanks.” End of conversation. Another time I had asked him what time he was available and then I forgot so I asked again and said “sorry I’m old I have a bad memory.” Which he replied, “well at least your age doesn’t show.” Again this was the end of that conversation. Anywayyyyy my boyfriend decided to go through my text messages and he got really upset about those. In my head I have done nothing wrong I did not pay any compliments back I said thank you and that’s it. But he says I shouldn’t have responded at all or told him it was inappropriate because I’m leaving the door open for him to continue to “flirt” with me. Is he just being overbearing and controlling? Or am I in the wrong?