-diff -ur ../MUTT/mutt/PATCHES mutt/PATCHES
---- ../MUTT/mutt/PATCHES 2002-12-09 18:44:54.000000000 +0100
-+++ mutt/PATCHES 2004-01-19 13:50:52.000000000 +0100
-@@ -1,0 +1 @@
-+patch-1.5.5.1.nt.xtitles.3.ab.1
-diff -ur ../MUTT/mutt/curs_main.c mutt/curs_main.c
---- ../MUTT/mutt/curs_main.c 2003-09-03 19:09:09.000000000 +0200
-+++ mutt/curs_main.c 2004-01-19 13:45:37.000000000 +0100
-@@ -103,6 +103,19 @@
- extern const char *ReleaseDate;
+# vi: ft=diff
+This is the xterm title patch as found on the mutt mailing lists.
+
+* Changes made:
+ - 2007-01-27 myon: using %P caused a segfault, updated status.c to catch
+ menu==NULL.
+
+== END PATCH
+Index: mutt/PATCHES
+===================================================================
+--- mutt.orig/PATCHES 2007-01-27 19:33:32.932962104 +0100
++++ mutt/PATCHES 2007-01-27 19:33:32.932962104 +0100
+@@ -0,0 +1 @@
++patch-1.5.13.nt+ab.xtitles.4
+Index: mutt/curs_main.c
+===================================================================
+--- mutt.orig/curs_main.c 2006-12-12 14:15:02.000000000 +0100
++++ mutt/curs_main.c 2007-01-27 19:33:32.933961952 +0100
+@@ -110,6 +110,19 @@ static const char *No_visible = N_("No v
+
extern size_t UngetCount;
+#define ASCII_CTRL_G 0x07
void index_make_entry (char *s, size_t l, MUTTMENU *menu, int num)
{
format_flag flag = M_FORMAT_MAKEPRINT | M_FORMAT_ARROWCURSOR | M_FORMAT_INDEX;
-@@ -562,6 +575,13 @@
- mutt_paddstr (COLS, buf);
+@@ -568,6 +581,13 @@ int mutt_index_menu (void)
SETCOLOR (MT_COLOR_NORMAL);
+ BKGDSET (MT_COLOR_NORMAL);
menu->redraw &= ~REDRAW_STATUS;
+ if (option(OPTXTERMSETTITLES))
+ {
}
menu->redraw = 0;
-diff -ur ../MUTT/mutt/globals.h mutt/globals.h
---- ../MUTT/mutt/globals.h 2003-07-15 13:41:32.000000000 +0200
-+++ mutt/globals.h 2004-01-19 13:45:37.000000000 +0100
-@@ -112,6 +112,8 @@
+Index: mutt/globals.h
+===================================================================
+--- mutt.orig/globals.h 2007-01-04 15:23:49.000000000 +0100
++++ mutt/globals.h 2007-01-27 19:33:32.933961952 +0100
+@@ -137,6 +137,8 @@ WHERE char *Tempdir;
WHERE char *Tochars;
WHERE char *Username;
WHERE char *Visual;
+WHERE char *XtermTitle;
+WHERE char *XtermIcon;
+ WHERE char *CurrentFolder;
WHERE char *LastFolder;
-
-diff -ur ../MUTT/mutt/init.c mutt/init.c
---- ../MUTT/mutt/init.c 2004-01-05 19:49:00.000000000 +0100
-+++ mutt/init.c 2004-01-19 13:48:45.000000000 +0100
-@@ -891,6 +891,26 @@
+Index: mutt/init.c
+===================================================================
+--- mutt.orig/init.c 2006-12-12 14:15:03.000000000 +0100
++++ mutt/init.c 2007-01-27 19:33:32.934961800 +0100
+@@ -1747,6 +1747,26 @@ static int parse_set (BUFFER *tmp, BUFFE
toggle_option (MuttVars[idx].data);
else
set_option (MuttVars[idx].data);
+
+ }
}
- else if (DTYPE (MuttVars[idx].type) == DT_STR ||
+ else if (myvar || DTYPE (MuttVars[idx].type) == DT_STR ||
DTYPE (MuttVars[idx].type) == DT_PATH ||
-diff -ur ../MUTT/mutt/init.h mutt/init.h
---- ../MUTT/mutt/init.h 2004-01-05 19:49:00.000000000 +0100
-+++ mutt/init.h 2004-01-19 13:45:37.000000000 +0100
-@@ -2670,6 +2670,27 @@
+Index: mutt/init.h
+===================================================================
+--- mutt.orig/init.h 2006-12-12 14:15:03.000000000 +0100
++++ mutt/init.h 2007-01-27 19:33:32.936961496 +0100
+@@ -2941,6 +2941,27 @@ struct option_t MuttVars[] = {
** Controls whether mutt writes out the Bcc header when preparing
- ** messages to be sent. Exim users may wish to use this.
+ ** messages to be sent. Exim users may wish to unset this.
*/
+ {"xterm_icon", DT_STR, R_BOTH, UL &XtermIcon, UL "M%?n?AIL&ail?"},
+ /*
/*--*/
{ NULL }
};
-diff -ur ../MUTT/mutt/mutt.h mutt/mutt.h
---- ../MUTT/mutt/mutt.h 2004-01-05 19:49:00.000000000 +0100
-+++ mutt/mutt.h 2004-01-19 13:45:37.000000000 +0100
-@@ -424,6 +424,7 @@
+Index: mutt/mutt.h
+===================================================================
+--- mutt.orig/mutt.h 2007-01-04 15:23:49.000000000 +0100
++++ mutt/mutt.h 2007-01-27 19:33:32.936961496 +0100
+@@ -451,6 +451,7 @@ enum
OPTWRAPSEARCH,
OPTWRITEBCC, /* write out a bcc header? */
OPTXMAILER,
+ OPTXTERMSETTITLES,
- /* PGP options */
-
-diff -ur ../MUTT/mutt/pager.c mutt/pager.c
---- ../MUTT/mutt/pager.c 2004-01-05 19:49:00.000000000 +0100
-+++ mutt/pager.c 2004-01-19 13:45:37.000000000 +0100
-@@ -26,6 +26,8 @@
+ OPTCRYPTUSEGPGME,
+
+Index: mutt/pager.c
+===================================================================
+--- mutt.orig/pager.c 2006-12-12 14:15:03.000000000 +0100
++++ mutt/pager.c 2007-01-27 19:33:32.937961344 +0100
+@@ -30,6 +30,8 @@
#include "pager.h"
#include "attach.h"
#include "mbyte.h"
#include "mx.h"
-@@ -1740,6 +1742,13 @@
- SETCOLOR (MT_COLOR_STATUS);
- mutt_paddstr (COLS, buffer);
+@@ -1765,6 +1767,13 @@ mutt_pager (const char *banner, const ch
+ addstr (topline == 0 ? "all)" : "end)");
+ BKGDSET (MT_COLOR_NORMAL);
SETCOLOR (MT_COLOR_NORMAL);
+ if (option(OPTXTERMSETTITLES))
+ {
+ }
}
- redraw = 0;
+ if ((redraw & REDRAW_INDEX) && index)
+Index: mutt/status.c
+===================================================================
+--- mutt.orig/status.c 2007-01-27 19:33:36.429430560 +0100
++++ mutt/status.c 2007-01-27 19:34:11.072164064 +0100
+@@ -191,6 +191,8 @@ status_format_str (char *buf, size_t buf
+ break;
+
+ case 'P':
++ if (!menu)
++ break;
+ if (menu->top + menu->pagelen >= menu->max)
+ cp = menu->top ? "end" : "all";
+ else