It uses a fixed spell depending on your class.
Priest = Flash Heal
Druid = Healing Touch
Paladin = Holy Light
Shaman = Healing Wave
Warlock = Corruption, Shadow Bolt, or Fear
Mage = Fireball or Fire Blast
Others = uses CheckInteractDistance to check if you're in range to follow (about 28 yds)
If you want to change what spell is used, open RangeCheck.lua and change the spell name. You can also add a "short distance check" spell for the classes that don't have them (I used Cure, Cleanse, and Abolish spells).
That explains it, though I'm baffled as to why there's no range check for hunters since there is a talent that gives longer range on shots, so it's possible for a hunter to have any of 4 different maximum ranges for our shots, plus the normal range for our pet heals/feeds.
This seems like something that should be added to the main distribution.