(update_window): Don't set the cursor at the end