Fixed undo for indentation (mostly).
Indentation performance optimization.