Fix vertical cursor motion when there's a display string with newline at EOL.