Calculate nameLength based on the first line's length as opposed to the cursor position