From fe23f004535336d4d6103eada14a59173c212edb Mon Sep 17 00:00:00 2001 From: pdmef Date: Sat, 6 Aug 2005 19:22:47 +0000 Subject: [PATCH] Rocco Rutte: - really fix #4709 this time (at least I hope ;-) git-svn-id: svn://svn.berlios.de/mutt-ng/trunk@373 e385b8ad-14ed-0310-8656-cc95a2468c6d --- handler.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/handler.c b/handler.c index 74677fd..505fb38 100644 --- a/handler.c +++ b/handler.c @@ -986,11 +986,18 @@ static void text_plain_flowed_handler (BODY * a, STATE * s) quotelevel = newql; } } - else { - /* in case there's no [\r\n], we only have a single line - * -> display it (fixes #4709) */ - print_flowed_line (buf, s, quotelevel); - /* TODO add handling of very long lines */ + else if (bytes == 0) { + /* in case there's no line end it's likely the last line + * so append to current (if any) */ + if (buf[newql] == ' ') + curline[mutt_strlen (curline) - 1] = '\0'; + curline = realloc (curline, curline_len + mutt_strlen (buf)); + if (curline_len == 1) + *curline = '\0'; + curline_len += mutt_strlen (buf); + safe_strncat (curline, curline_len, buf + newql, + mutt_strlen (buf + newql)); + break; } } if (curline) { -- 2.20.1