]> granicus.if.org Git - mutt/commitdiff
Make f=f handler behave like old f=f handler for quoted lines
authorRocco Rutte <pdmef@gmx.net>
Tue, 20 Mar 2007 15:20:10 +0000 (08:20 -0700)
committerRocco Rutte <pdmef@gmx.net>
Tue, 20 Mar 2007 15:20:10 +0000 (08:20 -0700)
Now lines containing quote characters but no further content appear as
quoted lines again for making replies. Also, the spaces between quotes
and text are removed to make output look as it did for the old handler.

rfc3676.c

index 6a6a7da34e0ad2a63ff15c6b48c68f7699aa576f..78849c3181a6b668be57973ab8b9e904d5ed29d7 100644 (file)
--- a/rfc3676.c
+++ b/rfc3676.c
@@ -53,20 +53,14 @@ static int get_quote_level (const char *line)
   return quoted;
 }
 
-static void print_empty_line (int ql, STATE *s)
+static void print_indent (int ql, STATE *s)
 {
   int i;
 
-  if (!(s->flags & M_REPLYING))
-  {
-    if (s->prefix)
-      state_puts (s->prefix, s);
-    for (i = 0; i < ql; i++)
-      state_putc ('>', s);
-    if (!(s->flags & M_REPLYING))
-      state_putc (' ', s);
-  }
-  state_putc ('\n', s);
+  if (s->prefix)
+    state_puts (s->prefix, s);
+  for (i = 0; i < ql; i++)
+    state_putc ('>', s);
 }
 
 static void print_flowed_line (const char *line, STATE *s, int ql)
@@ -74,7 +68,6 @@ static void print_flowed_line (const char *line, STATE *s, int ql)
   int width;
   char *pos, *oldpos;
   int len = mutt_strlen (line);
-  int i;
 
   width = (Wrap ? mutt_term_width (Wrap) : FLOWED_MAX) - ql - 1;
 
@@ -85,7 +78,8 @@ static void print_flowed_line (const char *line, STATE *s, int ql)
 
   if (len == 0)
   {
-    print_empty_line (ql, s);
+    print_indent (ql, s);
+    state_putc ('\n', s);
     return;
   }
 
@@ -134,13 +128,7 @@ static void print_flowed_line (const char *line, STATE *s, int ql)
       dprint (4, (debugfile, "f=f: line completely fits on screen\n"));
     }
 
-    if (s->prefix)
-      state_puts (s->prefix, s);
-
-    for (i = 0; i < ql; ++i)
-      state_putc ('>', s);
-    if (!(s->flags & M_REPLYING) && (ql > 0 || s->prefix))
-      state_putc (' ', s);
+    print_indent (ql, s);
     state_puts (oldpos, s);
 
     if (pos < line + len)