Fix vertical cursor motion when the newline is covered by a display string.