Rocco Rutte:
authorpdmef <pdmef@e385b8ad-14ed-0310-8656-cc95a2468c6d>
Sat, 6 Aug 2005 19:22:47 +0000 (19:22 +0000)
committerpdmef <pdmef@e385b8ad-14ed-0310-8656-cc95a2468c6d>
Sat, 6 Aug 2005 19:22:47 +0000 (19:22 +0000)
- 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

index 74677fd..505fb38 100644 (file)
--- 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) {