bug fix: cursor reset when autosave document