Keep your heart with all vigilance, for from it flow the springs of life. (Prov 4:23)
And yet, certainly, when the mind is pleased in thought alone with unlawful things, while not indeed determining that they are to be done, but yet holding and pondering gladly things which ought to have been rejected the very moment they touched the mind, it cannot be denied to be a sin, but far less than if it were also determined to accomplished it in outward act. And therefore pardon must be sought for such thoughts too, and the breast must be smitten, and it must be said, "Forgive us our debts;" and what follows must be done, and must be joined in our prayer, "As we also forgive our debtors" (Matt 6:12).
And yet, certainly, when the mind is pleased in thought alone with unlawful things, while not indeed determining that they are to be done, but yet holding and pondering gladly things which ought to have been rejected the very moment they touched the mind, it cannot be denied to be a sin, but far less than if it were also determined to accomplished it in outward act. And therefore pardon must be sought for such thoughts too, and the breast must be smitten, and it must be said, "Forgive us our debts;" and what follows must be done, and must be joined in our prayer, "As we also forgive our debtors" (Matt 6:12).
Augustine, On the Holy Trinity 12.12.18