X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=handler.c;h=721d998d01044a0174a04ba8b648aece4484944d;hp=666638b3cb4f05763673732b5aa50536802db4bf;hb=4a9d00d99a1b6b24a9fcc8eb604dc3812b2782b8;hpb=6833ce8bdca2d64e14485118f2a4417b7e1cb1b1 diff --git a/handler.c b/handler.c index 666638b..721d998 100644 --- a/handler.c +++ b/handler.c @@ -1487,6 +1487,9 @@ void multipart_handler (BODY *a, STATE *s) } mutt_body_handler (p, s); state_putc ('\n', s); + if ((s->flags & M_REPLYING) + && (option (OPTINCLUDEONLYFIRST)) && (s->flags & M_FIRSTDONE)) + break; } if (a->encoding == ENCBASE64 || a->encoding == ENCQUOTEDPRINTABLE || @@ -1897,7 +1900,7 @@ void mutt_body_handler (BODY *b, STATE *s) /* restore final destination and substitute the tempfile for input */ s->fpout = fp; fp = s->fpin; - s->fpin = fopen (tempfile, "r"); + s->fpin = safe_fopen (tempfile, "r"); unlink (tempfile); /* restore the prefix */ @@ -1922,6 +1925,7 @@ void mutt_body_handler (BODY *b, STATE *s) s->fpin = fp; } } + s->flags |= M_FIRSTDONE; } else if (s->flags & M_DISPLAY) { @@ -1939,5 +1943,5 @@ void mutt_body_handler (BODY *b, STATE *s) } bail: - s->flags = oflags; + s->flags = oflags | (s->flags & M_FIRSTDONE); }