From: Rocco Rutte Date: Tue, 7 Jul 2009 11:00:13 +0000 (+0200) Subject: Add $wrap_headers. Closes #3135 X-Git-Tag: mutt-1-5-21-rel~170 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f6d4088a71988bc1ef3d6e8194400f7fabf4712e;p=mutt Add $wrap_headers. Closes #3135 --- diff --git a/UPDATING b/UPDATING index 6bbfdb7d..515d9529 100644 --- 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): diff --git a/globals.h b/globals.h index 94aa457c..62d831d7 100644 --- 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 01c9af05..4c8213c1 100644 --- 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 diff --git a/sendlib.c b/sendlib.c index 437ff4c8..c4f5e469 100644 --- 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;