[Issue #37] Fixed the cursor position when formatting the active file