Restore cursor position on open