1 diff -dur -x '*~' -x '*.orig' mutt-1.5.10.orig/curs_main.c mutt-1.5.10/curs_main.c
2 --- mutt-1.5.20.b/curs_main.c 2009-07-14 12:34:25.000000000 +0200
3 +++ mutt-1.5.20/curs_main.c 2009-07-14 12:42:41.000000000 +0200
5 menu_redraw_current (menu);
8 - if (menu->redraw & REDRAW_STATUS)
9 + if (menu->redraw & REDRAW_STATUS || update_status_time ())
11 menu_status_line (buf, sizeof (buf), menu, NONULL (Status));
12 mutt_window_move (MuttStatusWindow, 0, 0);
13 --- mutt-1.5.18/globals.h.orig 2008-01-30 05:26:50.000000000 +0100
14 +++ mutt-1.5.18/globals.h 2008-07-25 17:41:02.532746787 +0200
17 WHERE short SendmailWait;
18 WHERE short SleepTime INITVAL (1);
19 +WHERE short StatusUpdate;
23 --- mutt-2.0.6/init.h.orig 2021-03-06 19:06:37.000000000 +0000
24 +++ mutt-2.0.6/init.h 2021-04-07 17:25:21.720777040 +0000
26 ** .dt %u .dd number of unread messages *
27 ** .dt %v .dd Mutt version string
28 ** .dt %V .dd currently active limit pattern, if any *
29 + ** .dt %[fmt] .dd the current date and time. ``fmt'' is
30 + ** expanded by the system call ``strftime'';
31 ** .dt %>X .dd right justify the rest of the string and pad with ``X''
32 ** .dt %|X .dd pad to the end of the line with ``X''
33 ** .dt %*X .dd soft-fill with character ``X'' as pad
34 @@ -4248,6 +4250,16 @@
35 ** the first line of the screen rather than near the bottom. If $$help
36 ** is \fIset\fP, too it'll be placed at the bottom.
38 + { "status_update", DT_NUM, R_NONE, {.p=&StatusUpdate}, {.l=-1} },
41 + ** This variable controls, if positive, the maximum interval in seconds
42 + ** before the time in the status line is updated. It is checked at
43 + ** every key press and after a keyboard $$timeout.
44 + ** If the value is zero, the status line will be updated at every check.
45 + ** If it is negative, the status time will only be updated
46 + ** if it necessary to update to the status line for some other reason.
48 { "strict_threads", DT_BOOL, R_RESORT|R_RESORT_INIT|R_INDEX, {.l=OPTSTRICTTHREADS}, {.l=0} },
51 diff -dur -x '*~' -x '*.orig' mutt-1.5.10.orig/menu.c mutt-1.5.10/menu.c
52 --- mutt-1.5.10.orig/menu.c 2005-06-12 20:32:46.000000000 +0200
53 +++ mutt-1.5.10/menu.c 2005-10-07 09:28:24.000000000 +0200
54 @@ -1087,3 +1087,23 @@
59 +int update_status_time ()
64 + if (StatusUpdate < 0)
66 + else if (StatusUpdate == 0)
70 + if (now - Last >= StatusUpdate)
78 diff -dur -x '*~' -x '*.orig' mutt-1.5.10.orig/mutt_menu.h mutt-1.5.10/mutt_menu.h
79 --- mutt-1.5.10.orig/mutt_menu.h 2005-08-11 21:37:02.000000000 +0200
80 +++ mutt-1.5.10/mutt_menu.h 2005-10-07 09:28:59.000000000 +0200
82 void index_make_entry (char *, size_t, struct menu_t *, int);
83 int index_color (int);
85 +int update_status_time (void);
86 #endif /* _MUTT_MENU_H_ */
87 diff -dur -x '*~' -x '*.orig' mutt-1.5.10.orig/pager.c mutt-1.5.10/pager.c
88 --- mutt-1.5.10.orig/pager.c 2005-08-11 21:37:02.000000000 +0200
89 +++ mutt-1.5.10/pager.c 2005-10-07 09:28:24.000000000 +0200
94 - if ((pager_menu->redraw & REDRAW_INDEX) && rd->index)
95 + if (( (pager_menu->redraw & REDRAW_INDEX) || update_status_time()) && rd->index)
97 /* redraw the pager_index indicator, because the
98 * flags for this message might have changed. */
99 diff -dur -x '*~' -x '*.orig' mutt-1.5.10.orig/status.c mutt-1.5.10/status.c
100 --- mutt-1.5.10.orig/status.c 2005-10-07 09:28:10.000000000 +0200
101 +++ mutt-1.5.10/status.c 2005-10-07 09:28:24.000000000 +0200
108 + int len = sizeof (fmt) - 1;
116 + while (len > 0 && *src != ']')
128 + break; /* not enough space */
139 + time_t now = time (NULL);
140 + strftime (tmp, sizeof (tmp), fmt, localtime (&now));
142 + snprintf (fmt, sizeof (fmt), "%%%ss", prefix);
143 + snprintf (buf, buflen, fmt, tmp);
148 snprintf (buf, buflen, "%%%s%c", prefix, op);