Update the curor position on newline