[Mutt] #3135: cannot stop header wrap/folding; wrapping ignores user $wrap setting
#3135: cannot stop header wrap/folding; wrapping ignores user $wrap setting
-----------------------------------------------------+----------------------
Reporter: idallen | Owner: mutt-dev
Type: defect | Status: new
Priority: minor | Milestone:
Component: mutt | Version: 1.5.18
Keywords: wrap header fold folding terminal width |
-----------------------------------------------------+----------------------
Some time after 1.5.13, mutt started concatenating and wrapping long
header lines on blanks, using the current terminal width, even if you
set $wrap to zero, even if you set $wrap to a large value such as 200.
This new behaviour ruins the ability to read SpamAssassin reports, since
the reports are always re-formatted into an unreadable mess based on the
current terminal width ("COLS"), and nothing can prevent this mangling:
{{{
X-Spam-Report: -1.6
* 0.0 HTML_IMAGE_RATIO_08 BODY: HTML has a low ratio of text to
image
area * -2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1% *
[score: 0.0000] * 1.0 HTML_MESSAGE BODY: HTML included in message
}}}
The mangling happens regardless of whether the builtin pager is used
or an external pager is used. The mangling happens before the pager
gets the text; since, resizing the window doesn't change the mangling.
(To show a different mangling, you have to resize your terminal window,
then quit the pager, then redisplay the message.) Headers with short
lines are passed un-mangled.
This behaviour is somewhat new - Mutt 1.5.13 (2006-08-11) did not do this.
(Ubuntu 7.04 did not do this; Ubuntu 8.04 does.)
Both 1.5.18 and the latest Mercurial snapshot mangle.
The problem is either in mutt_copy_hdr(), which chooses the terminal
width as the wrap value, or in mutt_write_one_header(), which uses that
terminal width instead of the value given in $wrap. Whoever broke this
is in a better position to know how to fix it than I am.
--
Ticket URL: <http://dev.mutt.org/trac/ticket/3135>
Mutt <http://www.mutt.org/>
The Mutt mail user agent