Ticket #3080 (new defect)

Opened 2 months ago

Last modified 7 weeks ago

incorrect display of headers related to folding

Reported by: vinc17 Owned by: mutt-dev
Priority: minor Milestone: 1.6
Component: display Version: 1.5.18
Keywords: Cc:

Description

Under some conditions (when a long header line ends with a space?), Mutt regards a header line as being part of the previous one, e.g. instead of displaying:

Subject: 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 test
To: a@b.invalid

it displays:

Subject: 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 test
        To: a@b.invalid

Note: this is only a display problem.

Attachments

folding-bug (427 bytes) - added by vinc17 2 months ago.
testcase: mailbox file

Change History

Changed 2 months ago by vinc17

testcase: mailbox file

follow-up: ↓ 2   Changed 7 weeks ago by pdmef

I cannot reproduce this with -nF /dev/null. Is there a display_filter involved?

in reply to: ↑ 1   Changed 7 weeks ago by vinc17

Replying to pdmef:

I cannot reproduce this with -nF /dev/null. Is there a display_filter involved?

No display_filter involved. And the bug still occurs with:

./mutt -nF /dev/null -f folding-bug

under Debian and unpatched Mutt's tip.

  Changed 7 weeks ago by vinc17

And in case this could matter, the bug still occurs with LC_ALL=C TERM=vt100. I forgot to say, the terminal must have 80 columns.

  Changed 7 weeks ago by pdmef

  • milestone set to 1.6

I can now reproduce it with 80 cols.

The problem is that mutt_write_one_header() wraps the header at the trailing space and inserts a tab for folding (see #2995). To me it seems that it fails to notice that there's no further content and thus doesn't append \n to finish this header.

I'm marking milestone as 1.6 so that once we touch that function for #2995 we should also fix this issue.

Note: See TracTickets for help on using tickets.