summaryrefslogtreecommitdiffstats
path: root/hdrline.c
diff options
context:
space:
mode:
authorDerek Schrock <dereks@lifeofadishwasher.com>2015-09-20 20:37:47 -0400
committerDerek Schrock <dereks@lifeofadishwasher.com>2015-09-20 20:37:47 -0400
commit200144b6213bfdd12ecfbe74183c07cc850ae09f (patch)
treed77f332d2ae3ecb5f412a8563671ed131752c2f8 /hdrline.c
parentb3905c08f6705c2d0c5208de5c7e36261abb2b2d (diff)
Add new optional index_format expandos %r and %R.
These generate a comma separated list of all the To and Cc recipients. Also, increase the attribution buffer size to accommodate these new expandos.
Diffstat (limited to 'hdrline.c')
-rw-r--r--hdrline.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/hdrline.c b/hdrline.c
index 21adc282..b844411e 100644
--- a/hdrline.c
+++ b/hdrline.c
@@ -219,6 +219,8 @@ int mutt_user_is_recipient (HEADER *h)
* %N = score
* %O = like %L, except using address instead of name
* %P = progress indicator for builtin pager
+ * %r = comma separated list of To: recipients
+ * %R = comma separated list of Cc: recipients
* %s = subject
* %S = short message status (e.g., N/O/D/!/r/-)
* %t = `to:' field (recipients)
@@ -548,6 +550,22 @@ hdr_format_str (char *dest,
strfcpy(dest, NONULL(hfi->pager_progress), destlen);
break;
+ case 'r':
+ buf2[0] = 0;
+ rfc822_write_address(buf2, sizeof(buf2), hdr->env->to, 1);
+ if (optional && buf2[0] == '\0')
+ optional = 0;
+ mutt_format_s (dest, destlen, prefix, buf2);
+ break;
+
+ case 'R':
+ buf2[0] = 0;
+ rfc822_write_address(buf2, sizeof(buf2), hdr->env->cc, 1);
+ if (optional && buf2[0] == '\0')
+ optional = 0;
+ mutt_format_s (dest, destlen, prefix, buf2);
+ break;
+
case 's':
if (flags & M_FORMAT_TREE && !hdr->collapsed)