But I thought you said earlier that the Spirit is still indwelling, but is something like "dormant", until the mortal sin is resolved? The above doesn't sound like that, it sounds more like what Alex said. Based on what you've said, I was sort of expecting your answer to be that the Spirit would leave at the point of physical death, if the mortal sin is not taken care of.
What is the biblical meaning of "indwelling"? Perhaps that might help with understanding this. We know God is present EVERYWHERE, since anything that exists absolutely relies on God's effects. Thus, technically speaking, God doesn't "leave" a person in mortal sin, since then, that person would cease to exist. However, when we speak of indwelling, I think we are talking about something more than the Holy Spirit keeping us in existence. In this sense, when a person sins mortally, the indwelling is no longer effective. That is obvious, since to sin mortally requires that a man absolutely refuse God. However, we know that God CAN and DOES "re-indwell" within a person, because they can repent. Man cannot repent without God's graces.
Another thought is to consider how does a person FIRST come to Christ and repent? There must be some sort of "pre-Baptismal state" where the Spirit is not "indwelling" yet, but is still effective in some manner, calling a person to conversion and repentance.
Regards