projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Nico Golde:
[apps/madmutt.git]
/
editmsg.c
diff --git
a/editmsg.c
b/editmsg.c
index
c341542
..
0d037d4
100644
(file)
--- a/
editmsg.c
+++ b/
editmsg.c
@@
-21,6
+21,10
@@
/* simple, editor-based message editing */
/* simple, editor-based message editing */
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include "mutt.h"
#include "copy.h"
#include "mailbox.h"
#include "mutt.h"
#include "copy.h"
#include "mailbox.h"
@@
-75,7
+79,9
@@
static int edit_one_message (CONTEXT *ctx, HEADER *cur)
return -1;
}
return -1;
}
- rc = mutt_append_message (&tmpctx, ctx, cur, 0, CH_NOLEN | CH_NOSTATUS); oerrno = errno;
+ rc = mutt_append_message (&tmpctx, ctx, cur, 0, CH_NOLEN |
+ ((ctx->magic == M_MBOX || ctx->magic == M_MMDF) ? 0 : CH_NOSTATUS));
+ oerrno = errno;
mx_close_mailbox (&tmpctx, NULL);
mx_close_mailbox (&tmpctx, NULL);
@@
-139,7
+145,8
@@
static int edit_one_message (CONTEXT *ctx, HEADER *cur)
goto bail;
}
goto bail;
}
- of = cf = 0;
+ of = 0;
+ cf = ((tmpctx.magic == M_MBOX || tmpctx.magic == M_MMDF) ? 0 : CH_NOSTATUS);
if (fgets (buff, sizeof (buff), fp) && is_from (buff, NULL, 0, NULL))
{
if (fgets (buff, sizeof (buff), fp) && is_from (buff, NULL, 0, NULL))
{
@@
-167,7
+174,7
@@
static int edit_one_message (CONTEXT *ctx, HEADER *cur)
goto bail;
}
goto bail;
}
- if ((rc = mutt_copy_hdr (fp, msg->fp, 0, sb.st_size, CH_NO
STATUS | CH_NO
LEN | cf, NULL)) == 0)
+ if ((rc = mutt_copy_hdr (fp, msg->fp, 0, sb.st_size, CH_NOLEN | cf, NULL)) == 0)
{
fputc ('\n', msg->fp);
rc = mutt_copy_stream (fp, msg->fp);
{
fputc ('\n', msg->fp);
rc = mutt_copy_stream (fp, msg->fp);