summaryrefslogtreecommitdiffstats
path: root/hdrline.c
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>1999-07-28 10:07:54 +0000
committerThomas Roessler <roessler@does-not-exist.org>1999-07-28 10:07:54 +0000
commit78697029c8e433299ba2177d973a4f154bfbfba7 (patch)
tree72968e7afb4a2d0fe924602930e1477384a8510d /hdrline.c
parent7b23687043bad611e5602233e3b51856f1617e88 (diff)
Enable the use of %F in conditionals. From Aaron Schrab
<aaron+mutt@schrab.com>.
Diffstat (limited to 'hdrline.c')
-rw-r--r--hdrline.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/hdrline.c b/hdrline.c
index b63b0cd8..4c628182 100644
--- a/hdrline.c
+++ b/hdrline.c
@@ -412,9 +412,14 @@ hdr_format_str (char *dest,
break;
case 'F':
- snprintf (fmt, sizeof (fmt), "%%%ss", prefix);
- make_from (hdr->env, buf2, sizeof (buf2), 0);
- snprintf (dest, destlen, fmt, buf2);
+ if (!optional)
+ {
+ snprintf (fmt, sizeof (fmt), "%%%ss", prefix);
+ make_from (hdr->env, buf2, sizeof (buf2), 0);
+ snprintf (dest, destlen, fmt, buf2);
+ }
+ else if (mutt_addr_is_user (hdr->env->from))
+ optional = 0;
break;
case 'i':