let cursor not move after trailing whitespace