]> git.pld-linux.org Git - packages/mutt.git/blob - mutt-vvv.initials.patch
- updated to 2.1.1
[packages/mutt.git] / mutt-vvv.initials.patch
1 diff -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
6 diff -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
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
17 @@ -480,6 +481,31 @@ hdr_format_str (char *dest,
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.028652 seconds and 3 git commands to generate.