That was called "Something Blue"

Willow was AWESOME in that episode.
Buffy more often than it doesn't has foreshadowing of future episodes or refers back to previous episodes. How o ften have you heard them refer back to the classic show form season 1, "Halloween"?

"Xander do you remember anything from hen you were army guy?"
"Hells Bells" in Season 6 has a reference to the Musical. "Earshot" foreshadows what will happen to Xander in "Fear, Itself". "Doppelgangland" has Willow refer back to "Prophesy Girl", in a funny way too
I love the continuity of the show. The writers never forget what's previously happened, making osbcure and subtle to in your face references of previous events. One of the longest distances between references I can think of happens in Season 6, in "Gone", when Xander, who after all this typing seems to have the best memory, references "Out of Mind, Out of Sight" from Season 1. i think this is part of what makes the show so cool, it feels like a real world since nothing really seems to be forgettn, loopholes, for the most part answered for, and we get to watch all the characters grow and change along the way.