Maintain caret position on format on save (#2)