Initial version of Cursor.replace().