Commits

Anonymous committed e952897

fix wrapping when first word of message is longer than we have

Comments (0)

Files changed (1)

 	if (line[len - 1] == '\n')
 		line[--len] = '\0';
 
-	wlen = break_len(line, line + len, cols);
+	p = (*(p + 1) == ' ') ? p + 2 : p + 1;
+
+	wlen = p - line + break_len(p, line + len, cols - (p - line));
 	printf("%.*s\n", wlen, line);
 
 	for (p = line + wlen; p < line + len; p += wlen) {