]> git.pld-linux.org Git - packages/mutt.git/blame - mutt-vvv.initials.patch
- cleanup, flea.1 manpage unlikely to come back, don't bother keeping it here
[packages/mutt.git] / mutt-vvv.initials.patch
CommitLineData
32845784
AG
1diff -udprP mutt-1.12.1.orig/PATCHES mutt-1.12.1/PATCHES
2--- mutt-1.12.1.orig/PATCHES 2017-12-03 05:10:17.000000000 +0200
3+++ mutt-1.12.1/PATCHES 2019-08-11 19:31:49.593096725 +0300
4@@ -0,0 +1 @@
5+vvv.initials
6diff -udprP mutt-1.12.1.orig/hdrline.c mutt-1.12.1/hdrline.c
7--- mutt-1.12.1.orig/hdrline.c 2019-05-25 19:22:39.000000000 +0300
8+++ mutt-1.12.1/hdrline.c 2019-08-11 19:31:49.594096710 +0300
3699f85e
AG
9@@ -228,6 +228,7 @@ static char *apply_subject_mods (ENVELOP
10 * %f = entire from line
11 * %F = like %n, unless from self
12 * %i = message-id
13+ * %I = initials of author
14 * %l = number of lines in the message
15 * %L = like %F, except `lists' are displayed first
16 * %m = number of messages in the mailbox
32845784 17@@ -480,6 +481,31 @@ hdr_format_str (char *dest,
3699f85e
AG
18 mutt_format_s (dest, destlen, prefix, hdr->env->message_id ? hdr->env->message_id : "<no.id>");
19 break;
20
21+ case 'I':
22+ {
23+ int iflag = FALSE;
24+ int j = 0;
25+
26+ for (i = 0; hdr->env->from && hdr->env->from->personal &&
27+ hdr->env->from->personal[i] && j < SHORT_STRING - 1; i++)
28+ {
29+ if (isalpha ((int)hdr->env->from->personal[i]))
30+ {
31+ if (!iflag)
32+ {
33+ buf2[j++] = hdr->env->from->personal[i];
34+ iflag = TRUE;
35+ }
36+ }
37+ else
38+ iflag = FALSE;
39+ }
40+
41+ buf2[j] = '\0';
42+ }
43+ mutt_format_s (dest, destlen, prefix, buf2);
44+ break;
45+
46 case 'l':
47 if (!optional)
48 {
This page took 0.064946 seconds and 4 git commands to generate.