Optimize indent calc + add comments

Now that we have a larger trigger function shared by lot of different
stuff, we need to think about when the function is triggered and not act
on all updates. This adds a check for indent calc so that the prefix
actually has been update before we run calc indent.

Kind of part of #248