Use of the particle と in this sentence


The sentence in question is:

> 相手の話の途中で話を始めるくせがあると、人に言われてはじめて気がついた。

I understand the meaning of this sentence as "I noticed my habit of
interrupting people until someone told me", my question is, the と particle,
what function is it playing here? is it a shortened という? It doesn't seem to be
the usual "when X then Y" or "AND".




It's a quotative particle that goes with 気がついた. (Thanks to @aguijonazo for
pointing out) 「相手の話の途中で話を始めるくせがある」 is being quoted as something which the
speaker noticed after being told that.

Your translation is slightly off. It's more like:

> I only noticed my bad habit of interrupting other people when they are
> talking when I was told that.

Things like "for the first time" are redundant and dispensed with in this
rough rendering.

