Fixed the bug whereby auto-indentation failed if the caret was at the EOF position.