Andreas Krennmair:
authorak1 <ak1@e385b8ad-14ed-0310-8656-cc95a2468c6d>
Thu, 10 Feb 2005 12:42:56 +0000 (12:42 +0000)
committerak1 <ak1@e385b8ad-14ed-0310-8656-cc95a2468c6d>
Thu, 10 Feb 2005 12:42:56 +0000 (12:42 +0000)
quote fix for f=f (fixed #3345)

git-svn-id: svn://svn.berlios.de/mutt-ng/trunk@57 e385b8ad-14ed-0310-8656-cc95a2468c6d

ChangeLog.mutt-ng
handler.c

index b80ee55..7f5a38f 100644 (file)
@@ -1,5 +1,8 @@
 Changes specific to mutt-ng:
 
 Changes specific to mutt-ng:
 
+2005-02-10:
+  * quoting fix for f=f handler (fix for bug #3345)
+
 2005-02-06:
   * rewrote handler for f=f attachments to produce nicer output
 
 2005-02-06:
   * rewrote handler for f=f attachments to produce nicer output
 
index e53ca37..9cadb72 100644 (file)
--- a/handler.c
+++ b/handler.c
@@ -1207,6 +1207,8 @@ static void print_flowed_line(char * line, STATE *s,int ql) {
   int len = strlen(line);
   int i;
 
   int len = strlen(line);
   int i;
 
+  fprintf(stderr,"prefix = `%s'\n",s->prefix);
+
   width = COLS - WrapMargin - ql - 1;
   if (option(OPTSTUFFQUOTED))
     --width;
   width = COLS - WrapMargin - ql - 1;
   if (option(OPTSTUFFQUOTED))
     --width;
@@ -1216,7 +1218,11 @@ static void print_flowed_line(char * line, STATE *s,int ql) {
   /* fprintf(stderr,"print_flowed_line will print `%s' with ql = %d\n",line,ql); */
 
   if (strlen(line)==0) {
   /* fprintf(stderr,"print_flowed_line will print `%s' with ql = %d\n",line,ql); */
 
   if (strlen(line)==0) {
+    if (s->prefix)
+      state_puts(s->prefix,s);
     for (i=0;i<ql;++i) state_putc('>',s);
     for (i=0;i<ql;++i) state_putc('>',s);
+    if (option(OPTSTUFFQUOTED))
+      state_putc(' ',s);
     state_putc('\n',s);
     return;
   }
     state_putc('\n',s);
     return;
   }
@@ -1257,11 +1263,15 @@ static void print_flowed_line(char * line, STATE *s,int ql) {
     } else {
       /* fprintf(stderr,"if 1 else\n"); */
     }
     } else {
       /* fprintf(stderr,"if 1 else\n"); */
     }
+    if (s->prefix)
+      state_puts(s->prefix,s);
     for (i=0;i<ql;++i)
       state_putc('>',s);
     for (i=0;i<ql;++i)
       state_putc('>',s);
-    if (option(OPTSTUFFQUOTED) && ql>0) state_putc(' ',s);
+    if (option(OPTSTUFFQUOTED) && (ql>0 || s->prefix)) state_putc(' ',s);
     state_puts(oldpos,s);
     /* fprintf(stderr,"print_flowed_line: `%s'\n",oldpos); */
     state_puts(oldpos,s);
     /* fprintf(stderr,"print_flowed_line: `%s'\n",oldpos); */
+    if (pos<line+len)
+      state_putc(' ',s);
     state_putc('\n',s);
     oldpos = pos;
   }
     state_putc('\n',s);
     oldpos = pos;
   }