Previously, if the current line was "empty", resizes wouldn't trigger repaints. However, the line can be empty when the prompt is non-empty and the code would then panic after a resize because the cursor position was outside of the terminal. LGTM=bradfitz R=bradfitz CC=golang-codereviews https://golang.org/cl/158090043