set the cursor at the end of the text