[patch] User-customizable markers
The attached patch (for mutt-1.4.1i) adds a new user-customizable
parameter to muttrc:
wrapstr (string, default "+")
that controls the marker that gets added in mutt's pager when wrapping.
I use it to simulate slrn's wrapping behavior:
set wrapstr " "
mono markers none
I do not follow the list, so please CC me.
Bests!
--
'(wave++ "Yuri D'Elia" "http://www.yuv.info/")
diff -ud -ruNd mutt-1.4.1-orig/globals.h mutt-1.4.1/globals.h
--- mutt-1.4.1-orig/globals.h Thu Jan 03 21:57:19 CET 2002
+++ mutt-1.4.1/globals.h Sun Dec 07 17:20:37 CET 2003
@@ -111,6 +111,7 @@
WHERE char *Tochars;
WHERE char *Username;
WHERE char *Visual;
+WHERE char *WrapStr;
WHERE char *LastFolder;
diff -ud -ruNd mutt-1.4.1-orig/init.h mutt-1.4.1/init.h
--- mutt-1.4.1-orig/init.h Wed Jul 24 10:41:29 CEST 2002
+++ mutt-1.4.1/init.h Sun Dec 07 17:23:43 CET 2003
@@ -2351,6 +2351,12 @@
** Controls the margin left at the right side of the terminal when mutt's
** pager does smart wrapping.
*/
+ { "wrapstr", DT_STR, R_PAGER, UL &WrapStr, UL "+" },
+ /*
+ ** .pp
+ ** Controls the marker that gets added at the left side of the terminal when
+ ** mutt's pager does wrapping.
+ */
{ "write_inc", DT_NUM, R_NONE, UL &WriteInc, 10 },
/*
** .pp
diff -ud -ruNd mutt-1.4.1-orig/pager.c mutt-1.4.1/pager.c
--- mutt-1.4.1-orig/pager.c Sun Jan 13 09:52:15 CET 2002
+++ mutt-1.4.1/pager.c Sun Dec 07 17:33:07 CET 2003
@@ -189,7 +189,7 @@
if (!cnt && option (OPTMARKERS))
{
SETCOLOR (MT_COLOR_MARKERS);
- addch ('+');
+ addstr (WrapStr);
last_color = ColorDefs[MT_COLOR_MARKERS];
}
m = (lineInfo[n].syntax)[0].first;
@@ -313,7 +313,7 @@
lineInfo[n+1].type = lineInfo[n].type;
(lineInfo[n+1].syntax)[0].color = (lineInfo[n].syntax)[0].color;
- lineInfo[n+1].continuation = 1;
+ lineInfo[n+1].continuation = mutt_strlen (WrapStr);
/* find the real start of the line */
for (m = n; m >= 0; m--)