aboutsummaryrefslogtreecommitdiff
path: root/overlays/neomutt/tx.patch
diff options
context:
space:
mode:
Diffstat (limited to 'overlays/neomutt/tx.patch')
-rw-r--r--overlays/neomutt/tx.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/overlays/neomutt/tx.patch b/overlays/neomutt/tx.patch
new file mode 100644
index 0000000..c8736df
--- /dev/null
+++ b/overlays/neomutt/tx.patch
@@ -0,0 +1,44 @@
1commit 61ae454e1579d02736c48e3468a3237429214cdf
2Author: Ismaƫl Bouya <ismael.bouya@normalesup.org>
3Date: Tue Jun 2 13:03:04 2020 +0200
4
5 Add %tx to index_format
6
7diff --git a/hdrline.c b/hdrline.c
8index 9224c6641..1594ed729 100644
9--- a/hdrline.c
10+++ b/hdrline.c
11@@ -575,6 +575,7 @@ static const char *index_format_str(char *buf, size_t buflen, size_t col, int co
12 const struct Address *from = TAILQ_FIRST(&e->env->from);
13 const struct Address *to = TAILQ_FIRST(&e->env->to);
14 const struct Address *cc = TAILQ_FIRST(&e->env->cc);
15+ const struct Address *x_orig_to = TAILQ_FIRST(&e->env->x_original_to);
16
17 buf[0] = '\0';
18 switch (op)
19@@ -1192,13 +1193,18 @@ static const char *index_format_str(char *buf, size_t buflen, size_t col, int co
20
21 case 't':
22 tmp[0] = '\0';
23- if (!check_for_mailing_list(&e->env->to, "To ", tmp, sizeof(tmp)) &&
24- !check_for_mailing_list(&e->env->cc, "Cc ", tmp, sizeof(tmp)))
25- {
26- if (to)
27- snprintf(tmp, sizeof(tmp), "To %s", mutt_get_name(to));
28- else if (cc)
29- snprintf(tmp, sizeof(tmp), "Cc %s", mutt_get_name(cc));
30+ if (src[0] == 'x') {
31+ snprintf(tmp, sizeof(tmp), "%s", mutt_get_name(x_orig_to));
32+ src++;
33+ } else {
34+ if (!check_for_mailing_list(&e->env->to, "To ", tmp, sizeof(tmp)) &&
35+ !check_for_mailing_list(&e->env->cc, "Cc ", tmp, sizeof(tmp)))
36+ {
37+ if (to)
38+ snprintf(tmp, sizeof(tmp), "To %s", mutt_get_name(to));
39+ else if (cc)
40+ snprintf(tmp, sizeof(tmp), "Cc %s", mutt_get_name(cc));
41+ }
42 }
43 mutt_format_s(buf, buflen, prec, tmp);
44 break;