]> granicus.if.org Git - mutt/commitdiff
Add $wrap_headers. Closes #3135
authorRocco Rutte <pdmef@gmx.net>
Tue, 7 Jul 2009 11:00:13 +0000 (13:00 +0200)
committerRocco Rutte <pdmef@gmx.net>
Tue, 7 Jul 2009 11:00:13 +0000 (13:00 +0200)
UPDATING
globals.h
init.h
sendlib.c

index 6bbfdb7d6332a4eadb8214989f1e6ea3a96bf6b3..515d9529a30a357f7336c82c2c30c9c592f63e64 100644 (file)
--- a/UPDATING
+++ b/UPDATING
@@ -6,6 +6,7 @@ The keys used are:
 
 hg tip:
 
+  + $wrap_headers to control outgoing message's header length
   + all text/* parts can be displayed inline without mailcap
 
 1.5.20 (2009-06-14):
index 94aa457c5333bdffdc47ac2856e05ca2c55a1981..62d831d7525c7992d39f6c46c445a932f36aa6ac 100644 (file)
--- a/globals.h
+++ b/globals.h
@@ -200,6 +200,7 @@ WHERE short SleepTime INITVAL (1);
 WHERE short TimeInc;
 WHERE short Timeout;
 WHERE short Wrap;
+WHERE short WrapHeaders;
 WHERE short WriteInc;
 
 WHERE short ScoreThresholdDelete;
diff --git a/init.h b/init.h
index 01c9af05525b557c52ee29458ba10b258ffc804b..4c8213c133d12561ae574584b391d38526e417e0 100644 (file)
--- a/init.h
+++ b/init.h
@@ -3306,6 +3306,17 @@ struct option_t MuttVars[] = {
   ** characters of empty space on the right side of the terminal. Setting it
   ** to zero makes mutt wrap at the terminal width.
   */
+  { "wrap_headers",     DT_NUM,  R_PAGER, UL &WrapHeaders, 78 },
+  /*
+  ** .pp
+  ** This option specifies the number of characters to use for wrapping
+  ** an outgoing message's headers. Allowed values are between 78 and 998
+  ** inclusive.
+  ** .pp
+  ** \fBNote:\fP This option usually shouldn't be changed. RFC5233
+  ** recommends a line length of 78 (the default), so \fBplease only change
+  ** this setting when you know what you're doing\fP.
+  */
   { "wrap_search",     DT_BOOL, R_NONE, OPTWRAPSEARCH, 1 },
   /*
   ** .pp
index 437ff4c840a360448bc6cf80235d63e2584a128a..c4f5e4699268420bc4b053d907e0e87670e028b6 100644 (file)
--- a/sendlib.c
+++ b/sendlib.c
@@ -1794,7 +1794,12 @@ int mutt_write_one_header (FILE *fp, const char *tag, const char *value,
 
   /* when not displaying, use sane wrap value */
   if (!(flags & CH_DISPLAY))
-    wraplen = 76;
+  {
+    if (WrapHeaders < 78 || WrapHeaders > 998)
+      wraplen = 78;
+    else
+      wraplen = WrapHeaders;
+  }
   else if (wraplen <= 0 || wraplen > COLS)
     wraplen = COLS;