Quoting Urs Janßen on 2013-02-13 09:00:20 (+0100):
> this breaks the article display with news_headers_to_display in effect

The patch below should address this problem.

Best regards,
Tilmann Hentze.
--- a/src/cook.c
+++ b/src/cook.c
@@ -210,6 +210,7 @@ put_cooked(
 	char *p, *bufp, *buf;
 	int wrap_column;
 	int space;
+	char *blank_p = NULL;
 /*	static int overflow = 0; */ /* TODO: we don't use it (anymore?) */
 	static int saved_flags = 0;
 	va_list ap;
@@ -244,16 +245,22 @@ put_cooked(
 			while (space > 0 && *p && *p != '\n') {
 #if defined(MULTIBYTE_ABLE) && !defined(NO_LOCALE)
 				if ((bytes = mbtowc((wchar_t *) wp, p, MB_CUR_MAX)) > 0) {
+					if (iswspace(*wp)) blank_p = p;
 					if ((space -= wcwidth(*wp)) < 0)
 						break;
 					p += bytes;
 				} else
 					p++;
 #else
+				if (isspace(*p)) blank_p = p;
 				p++;
 				space--;
 #endif /* MULTIBYTE_ABLE && !NO_LOCALE */
 			}
+		  	if (blank_p != NULL && *p != '\n' && !(flags & C_HEADER)) {
+				p = blank_p + 1;
+				blank_p = NULL;
+			}
 		} else {
 			while (*p && *p != '\n')
 				p++;

Reply via email to