Restore a cursor after leaving the editor