Opening a message from the drafts folder for editing does not remove added linebreaks

Bug #120281 reported by August Karlstrom
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mozilla Thunderbird
Fix Released
Medium
thunderbird (Ubuntu)
Fix Released
Low
Mozilla Bugs

Bug Description

Binary package hint: mozilla-thunderbird

When I open a message for editing in the Drafts folder the linebreaks added by Thunderbird are not removed. The implication of this is that the line wrapping gets screwed up when I edit a paragraph.

Steps to reproduce:

1. Create a new message and type in some 100 characters (no line breaks).

2. Save the message.

3. Open the message for editing from the Drafts folder and append a new word at the end of the first line.

Result: The paragraph is not wrapped correctly; the appended word is on a line by itself despite not being the last word of the paragraph.

Expected result: The appended word should not be on a line by itself since it is not the last word in the paragraph.

ProblemType: Bug
Architecture: i386
Date: Thu Jun 14 00:21:24 2007
DistroRelease: Ubuntu 7.04
Package: mozilla-thunderbird 1.5.0.12-0ubuntu0.7.04
PackageArchitecture: i386
SourcePackage: mozilla-thunderbird
Uname: Linux karlan 2.6.20-16-generic #2 SMP Thu Jun 7 20:19:32 UTC 2007 i686 GNU/Linux

Revision history for this message
In , Stanio (stanio) wrote :

Yes, It seems that when:

user_pref("mailnews.send_plaintext_flowed", true);

the plain text editor supports some sort of internal formatting which when saved
as draft, do Rewrap, copy and paste a quoted text (with ">" in front) is loosed
or it isn't rebuilded in some manner. This way causing the insert of a blank
character before ">" (one of the things which is most annoying) this way
breaking up the format of the quoted text.

Revision history for this message
In , Julian Foad (julianfoad) wrote :

I confirm that this bug exists in Mozilla 1.0 [Mozilla/5.0 (Windows; U; Win 9x
4.90; en-US; rv:1.0.0) Gecko/20020530]. The way I see it is: messages with
"format=flowed" are correctly sent, received and displayed, but when I select
"Message / Edit As New" on ANY such message (in Inbox, Drafts or Sent, for
example) the flowed formatting is lost at that point and it appears in the
message editor with hard line breaks and with ">" quoting characters shown
verbatim rather than as a continuous vertical bar.

Revision history for this message
In , Greg-mozilla-bugzilla (greg-mozilla-bugzilla) wrote :

Rather than submit a new bug, I will comment here that in particular this makes
multiple iterations of drafting difficult. On opening a saved draft, even though
it looks flowed in the Drafts folder, the flowing is lost. It also makes
re-saved edits look bizarre when viewed flowed, because entirely new paragraphs
or lengthened lines will flow whereas entirely old ones no longer will. So (with
indentation and shortened width for clarity), the message

 One very long a paragraph.

 Two very long b paragraph.

could become

 One very long
 a paragraph.

 Two very long
 edit
 b paragraph.

 Three very long c paragraph.

Revision history for this message
In , Mozilla-bugs-nogin (mozilla-bugs-nogin) wrote :

Yes, this bugs exists and still around. In BuildID 2002111716 (trunk) compiled
and running on Red Hat Linux 7.3, "Edit draft" (and "Edit as new" probably as
well) will break paragraphs into separate lines.

P.S. The quotations problem (mentioned in comment #1) was fixed in bug 110949.

Revision history for this message
In , Esther (esther) wrote :

Uisng trunk build 20021121 on winxp, macosx and linux.
Aleksey, I don't see the problem with text being typed not wrapping on Edit as
New or Edit draft messages. Here is what I did to test this. Please let me
know your scenario so I can test it too.

1. Launch mail, have my mail account set for plain text editing.
2. Composed and sent myself a plain text message (wrapped set at 72 char) with 3
lines that wrapped.
3. Got the message and then clicked Reply, started typing text where the cursor
landed or in a bread in the quoted area after pressing <Enter> (note: if you
don't press <Enter> you are in the quoted text, if it's within the quoted text
area the text will type in a blue color), then I saved the message as a draft to
continue typing later.
4. Selected the Draft message and clicked on Edit, then continued typing where I
left off so it would hit the 72 char limit. I hit the limit and the text wrapped.
If your scenario includes typing within the quoted area without pressing <Enter>
to break the quote then this is the same a bug 161969.

For Edit as New I selected that same message that I sent in step 1 above and
clicked Message|Edit as New. I continued typing text and it wrapped at 72
characters.

Revision history for this message
In , Mozilla-bugs-nogin (mozilla-bugs-nogin) wrote :

> I don't see the problem with text being typed not wrapping

There is no problem with *newly* typed text. The problem is with the text that
was there in the *original* message (but not the quoted text) - any long
paragraphs become broken into short lines on "Edit as new", "Edit draft".

Steps:

0) Set up Mozilla to use plaintext compose and to wrap long lines.
1) Compose a new message to yourself. Type in a long paragraph that would wrap.
2) Use "Edit as new" on the message.
3) Send right away (w/o editing).

Expected: both copies are displayed identically, with long paragraphs flowing
(e.g. broken into line dynamically according to the window width).
Actual: first copy is displayed with flowed paragraphs, but the second copy is
sent and displayed with paragraphs broken into separate line (e.g. "soft" line
breaks become "hard" ones).

If in steps (1) and (2) you do "Save as Draft" and "Edit traft" instead, the
result will still be the same (paragraphs broken into lines).

If in step (3) you add another long paragraph (w/o touching the original text
that you typed in step (1) ), then the result is *really* ugly - the original
text is broken into lines and the new text is shown flowed!

Revision history for this message
In , Mozilla-bakerweb (mozilla-bakerweb) wrote :

*** Bug 175953 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Mcow (mcow) wrote :

Reference bug 45268.

Revision history for this message
In , Mcow (mcow) wrote :

See also bug 220575.

Revision history for this message
In , Sre4-ud91 (sre4-ud91) wrote :

*** Bug 221474 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Mcow (mcow) wrote :

*** Bug 222750 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Mcow (mcow) wrote :

*** Bug 225267 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Tuukka Tolvanen (sp3000) wrote :

*** Bug 236701 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Mcow (mcow) wrote :

*** Bug 247856 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Mcow (mcow) wrote :

*** Bug 231562 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Mcow (mcow) wrote :

*** Bug 270718 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Mcow (mcow) wrote :

*** Bug 259121 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Mcow (mcow) wrote :

*** Bug 271651 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Alex-milivojevic (alex-milivojevic) wrote :

Hm, just wondering. Has anybody worked on this bug in last two years (other
than marking bug reports as duplicate of this bug). This bug seems so old that
I haven't found it when I was filling my version of this very same bug report
(could have saved me some typing ;-) ).

Anyhow, I find that this bug is making Draft feature of Thunderbird rather
unusable. I believe that severity of this bug should be raised to at least
"major", because it severely criples one of the basic features of mail client.

Revision history for this message
In , Hal-merritt (hal-merritt) wrote :

(In reply to comment #19)
Concur. This, and the bug where the mail engine stops sending/receving mail
makes this product usable for many. I would vote 'show stopper' for both.

Revision history for this message
In , Andy-ozment (andy-ozment) wrote :

This bug still exists in Thunderbird version 1.0 (20041206).

Revision history for this message
In , Bugzilla-mcsmurf (bugzilla-mcsmurf) wrote :

*** Bug 274167 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Bleber (bleber) wrote :

(In reply to comment #19)
The incredible number of duplicates speaks for itself. I can not use the draft
feature in Thunderbird (for any message over one line in length) due to this
bug. Any insights on the development process? TB 1.0 still has this issue.

Revision history for this message
In , Ajschult (ajschult) wrote :

*** Bug 292322 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Mcow (mcow) wrote :

*** Bug 304342 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Peter-lairo (peter-lairo) wrote :

This bug is assigned to Ducarroz, but he has not made even one comment in the 3.5 years this bug has existed (nor in any of many other f=f bugs since ~2002). Perhaps mozilla.org is not even aware of this very annoying bug.
-> CC'ing <email address hidden> to give mozilla.org a "heads-up"

Revision history for this message
In , Bryce Nesbitt (bryce2) wrote :

Can someone at least changed the status from NEW? After 3.5 years, and dozens of duplicate reports, I think it is safe to say this is a confirmed issue.

Revision history for this message
In , Mcow (mcow) wrote :

"NEW" *means* "confirmed".

Revision history for this message
In , Bryce Nesbitt (bryce2) wrote :

Okay, thanks.
Note also that this issue contributes to longer URL's getting broken across two lines. I just ran into this again a few seconds ago.

Revision history for this message
In , Peter-lairo (peter-lairo) wrote :

I don't consider this bug to be "minor". I re-edit previously stored messages very often (Edit Draft, Edit as New), and encounter this bug daily. It make messages hard to read and ugly. A very visible Thunderbird deficiency IMO.

Nominating for Thunderbird 2.0

Revision history for this message
In , Manuel López-Ibáñez (manuellopezibanez) wrote :

Please, add this to the tracker of Rewrap issues (bug 192905) as:

Bug 155622 blocks 192905

Revision history for this message
In , Mozilla-bugs-nogin (mozilla-bugs-nogin) wrote :

(In reply to comment #31)
> Please, add this to the tracker of Rewrap issues (bug 192905) as:
>
> Bug 155622 blocks 192905
>
Bug 192905 is tracking the issues with the "Edit -> Rewrap" command, which is not what this bug is about.

Revision history for this message
In , Stewart (smjg) wrote :

*** Bug 290472 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Mumia-w-18-spam+nospam-bugzilla (mumia-w-18-spam+nospam-bugzilla) wrote :

This is a workaround for bug 155622: You select your response text in the preview pane, then press Ctrl-C (copy), then edit the message, then select the your response text in the edit window, then press Ctrl-V (paste).

http://groups.google.com/groups?<email address hidden>

Revision history for this message
In , Mkmelin+mozilla (mkmelin+mozilla) wrote :

*** Bug 356836 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Andrit (andrit) wrote :

the issue still is there in Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.2) Gecko/20070222 SeaMonkey/1.1.1

Revision history for this message
In , Bryce Nesbitt (bryce2) wrote :

This bug appears to have been fixed in Seamonkey.

However the Seamonkey solution comes at the loss of Format=Flowed text (See http://www.ietf.org/rfc/rfc2646.txt for details). Seamonkey sends plain text messages in traditional format, which cannot be correctly word wrapped on the receiving end no matter what.

HTML formatted messages, while malformed by Seamonkey, do not suffer the problem.

Revision history for this message
In , Andrit (andrit) wrote :

Sorry, but i don't see that it is fixed there.

I've played a bit with sources and it seems that this patch solves the problem:

Index: mailnews/compose/src/nsMsgCompose.cpp
===================================================================
RCS file: /cvsroot/mozilla/mailnews/compose/src/nsMsgCompose.cpp,v
retrieving revision 1.460.2.28
diff -u -r1.460.2.28 nsMsgCompose.cpp
--- mailnews/compose/src/nsMsgCompose.cpp 8 Feb 2007 22:21:08 -0000 1.460.2.28
+++ mailnews/compose/src/nsMsgCompose.cpp 25 Mar 2007 15:44:41 -0000
@@ -3829,7 +3829,15 @@
   // replace '\n' with <br> so that the line breaks won't be lost by html.
   // if mailtourl, do the same.
   if (m_composeHTML && (mType == nsIMsgCompType::New || mType == nsIMsgCompType::MailToUrl))
- body.ReplaceSubstring(NS_LITERAL_STRING("\n").get(), NS_LITERAL_STRING("<br>").get());
+ body.ReplaceSubstring(NS_LITERAL_STRING(NS_LINEBREAK).get(),
+ NS_LITERAL_STRING("<br>").get());
+
+ if (!m_composeHTML) {
+ body.ReplaceSubstring(NS_LITERAL_STRING(" \n").get(),
+ NS_LITERAL_STRING(" ").get());
+ body.ReplaceSubstring(NS_LITERAL_STRING(" \r\n").get(),
+ NS_LITERAL_STRING(" ").get());
+ }

   nsString empty;
   rv = ConvertAndLoadComposeWindow(empty, body, tSignature,

Revision history for this message
In , Andrit (andrit) wrote :

Actually the first change ("\n" to NS_LINEBREAK) is not related and should be not considered. Sorry for noise. (It is buggy a bit - it probably will not work if say on Windows you will work with letter saved on Unix. This is the reason why i double the replace with " \n" and " \r\n" to make sure it will work with letters saved on any platform.)

Here is the final patch without this change:

diff -u -r1.460.2.28 nsMsgCompose.cpp
--- mailnews/compose/src/nsMsgCompose.cpp 8 Feb 2007 22:21:08 -0000 1.460.2.28
+++ mailnews/compose/src/nsMsgCompose.cpp 26 Mar 2007 05:26:16 -0000
@@ -3831,6 +3831,13 @@
   if (m_composeHTML && (mType == nsIMsgCompType::New || mType == nsIMsgCompType::MailToUrl))
     body.ReplaceSubstring(NS_LITERAL_STRING("\n").get(), NS_LITERAL_STRING("<br>").get());

+ if (!m_composeHTML) {
+ body.ReplaceSubstring(NS_LITERAL_STRING(" \n").get(),
+ NS_LITERAL_STRING(" ").get());
+ body.ReplaceSubstring(NS_LITERAL_STRING(" \r\n").get(),
+ NS_LITERAL_STRING(" ").get());
+ }
+
   nsString empty;
   rv = ConvertAndLoadComposeWindow(empty, body, tSignature,
                                    PR_FALSE, m_composeHTML);

Revision history for this message
In , Mkmelin+mozilla (mkmelin+mozilla) wrote :

Andriy: please add patches as attachments. (Use the "add an attachment" link.)

Revision history for this message
In , Andrit (andrit) wrote :

Created an attachment (id=259665)
Possible bugfix

The same patch that is in https://bugzilla.mozilla.org/show_bug.cgi?id=155622#c39 but in separate file.

Revision history for this message
In , Andrit (andrit) wrote :

Sorry, the fix does not work correctly with flowed quoted text.

Revision history for this message
In , Andrit (andrit) wrote :

(From update of attachment 259665)
Sorry, the fix does not work correctly with flowed quoted text.

Revision history for this message
In , Andrit (andrit) wrote :

Created an attachment (id=259776)
Improved fix

This patch works correctly with flowed quotes.

Revision history for this message
In , Tuukka Tolvanen (sp3000) wrote :

(From update of attachment 259776)
You'll need to set 'review?' in the patch 'details' on someone to get attention; the recent parts of http://bonsai.mozilla.org/cvslog.cgi?file=/mozilla/mailnews/compose/src/nsMsgCompose.cpp will probably suggest reasonable review victims.

>+ char quote=0;

boolean; PRBool, PR_TRUE/FALSE

>+ for (int i=0; i < body.Length(); i++) {

signedness; PRUint32, check compiler warnings

>+ quote=1;

style; spaces

>+ if (body[j] == '\r')

if body[0] == '\n' you'd be looking at body[-1]

Revision history for this message
In , Andrit (andrit) wrote :

Created an attachment (id=259815)
improved fix2

Thank you Tuukka for detailed review. Here is adjusted patch.

Revision history for this message
In , Bienvenu (bienvenu) wrote :

(From update of attachment 259815)
Thx very much for working on this!

We don't really need to put bug #'s in the code - cvsblame will allow us find the bug, because the checkin comment will refer to the bug number.

we prefer spaces around operators, so i=0 should be i = 0, i==0 should be i == 0, or !i, i-1 should be i - 1.

What happens if the line terminator is '\r'? Or does the mac not use '\r' anymore? From lxr, it looks like it uses '\n', so your code should be ok.

The var name "j" is not meaningful - it would make the code a lot more readable if the var name indicated what "j" was - I think it's the index of the last char in the line, and if that char is a ' ', you're replacing the line terminating char(s) with ' '. So the code is basically doing this:

Look for unquoted lines - if we have an unquoted line that ends in a space, replace the end of line char(s) with spaces.

It would be good to have a comment that says that...

If that's correct, could you attach a new patch that addresses these comments? Thx!

Revision history for this message
In , Andrit (andrit) wrote :

Created an attachment (id=259823)
fix3

Thank you David for detailed review and suggestions. Here is the adjusted by your comments patch.

Revision history for this message
In , Andrit (andrit) wrote :

Created an attachment (id=259824)
fix3.1

Sorry. Brace indentation fixed.

Revision history for this message
In , Andrit (andrit) wrote :

Created an attachment (id=259874)
fix3.2

Comments adjusted.

Revision history for this message
In , Bienvenu (bienvenu) wrote :

(From update of attachment 259874)
thx for adding the comments. One final question, instead of replacing the CRLF's with spaces, should we just delete the CRLFs in this case? The previous line already ends with a space...

Revision history for this message
In , Andrit (andrit) wrote :

David, actually (as it is said in comment) CRLFs are just deleted. What the code does is the replace of " \r\n" with " ". I did it this was because the line

body.Replace(j, i-j + 1, ' ');

seemed to me more clear then

body.Replace(j + 1, i - j, '');

But this raise such questions then probably i was wrong and second line is more clear. What do you think?

Also one more thought: i think it would be good to check also whether wrapping is enabled at all (by analyzing wrapping length setting) and if it is not (wrapping length is 0) - do not perform this joining of lines. What do you think?

Also i noticed that even if wrapping is off (length is 0) saved mail has format=flowed and because of this it looks incorrect in preview - is this correct behavior? If one just switched off wrapping and while writing mails makes spaces at the end of some lines (say by mistake) - the mails in such a case will have format=flowed and will be looked different in preview. What do you think?

Thank you.

Revision history for this message
In , Bienvenu (bienvenu) wrote :

using Cut() would be much more clear (if Cut() is available - it's hard to keep up with our string classes).

yes, checking if wrapping is turned on would be a good idea, I think. I'm not an expert on all the different wrapping behaviours, however.

Revision history for this message
In , Andrit (andrit) wrote :

Created an attachment (id=260183)
fix4 with checking wether wrapping is enabled

Ok, then here is the adjusted patch with Cut() and checking whether wrapping is enabled.

Revision history for this message
In , Mcow (mcow) wrote :

I don't understand what the wrapping-enabled check is doing. It looks like you're referring to the plain-text wrap-column value. That should make no difference at all when reading the text in. I think that check can be dropped.

You said in comment 52 that with wrapping=0, "it looks incorrect in preview"
-- could you expand on this, please? I want to make sure that you're not adding a hack to fix a problem that is better addressed elsewhere, especially when I am so eagerly anticipating get the meat of this problem fixed.

Note that there are known problems with wrapping=0 and plain-text mail -- see bug 261467. Don't work around that bug by adding this check in here, it'll just break things in a way that will make it more difficult to fix later on.

|mailnews.wraplength=0| is primarily a hack that people use because
|mail.compose.wrap_to_window_width| is neither well-known nor does it work that well. Ideally, when f=f is turned on, wrap_to_window_width would be automatically enabled as well, *and* the editor would display that correctly, but for now it doesn't work that way.

Revision history for this message
In , Andrit (andrit) wrote :

Mike,

1) I think that check on wrapping-enabled is worth here. What is the reason to restore flowed text wrapping of the saved mail if one is switched wrapping off? I think this is related to bug#261467. If one does not use automatic wrapping - there is no reason to change his text behind his back - he should see the same text with the same behavior with the same CRLFs at the end of lines, right?

2) It seems to me that my last paragraph in https://bugzilla.mozilla.org/show_bug.cgi?id=155622#c52
comment 52 is exactly the reason of https://bugzilla.mozilla.org/show_bug.cgi?id=261467
bug 261467. I think if automatic wrapping is off (wrap length is 0) there should not be format=flowed attribute in saved/sent mails (as it is now). That is the attribute that makes mail viewers try to treat the mail text as flowed that actually is not true for mails manually wrapped (possibly with spaces at the end of lines, that cause joining of lines in flowed text viewers).

My fix is not related to this bug (bug#261467) - i just mentioned the strange behavior of composer i noticed that seems to be the reason of bug#261467.

Revision history for this message
In , Mkmelin+mozilla (mkmelin+mozilla) wrote :

*** Bug 377386 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Mscott-mozilla (mscott-mozilla) wrote :

(From update of attachment 260183)
this looks good to me, Tuukka and David have already given it a pretty good review.

I haven't had a chance to test it myself though...

Thanks for the patch!

Revision history for this message
In , Mcow (mcow) wrote :

> What is the reason to restore flowed text wrapping of the saved mail if one
> is switched wrapping off?

Well, like I said: wrap=0 is itself a bit of a hack. The behavior is distinct from f=f, and some people may be using wrap=0 for that specific behavior. I can't say if there's a case where someone wants f=f support *and* wrap=0, but f=f changes more than just wrapping.

I don't use wrap=0, so I don't really mind if you put the check in; I'm just not convinced that the check doesn't break something for someone else who might be using wrap=0. Further, I don't see that executing the line-break removal for the wrap=0 case prevents this bug from being fixed.

This is a nice complement to bug 125928. If only the trunk didn't have the loathsome display of body text in the thread pane, I'd be eagerly anticipating downloading a version with these bugs fixed; but Alas! The trunk is not useable due to that misfeature. :/

Revision history for this message
In , Andrit (andrit) wrote :

(In reply to comment #59)
> I'm just not convinced that the check doesn't break something for someone else
> who might be using wrap=0.

It won't, because the code executed only if wraplen != 0.

Revision history for this message
August Karlstrom (fusionfive) wrote :

Binary package hint: mozilla-thunderbird

When I open a message for editing in the Drafts folder the linebreaks added by Thunderbird are not removed. The implication of this is that the line wrapping gets screwed up when I edit a paragraph.

Steps to reproduce:

1. Create a new message and type in some 100 characters (no line breaks).

2. Save the message.

3. Open the message for editing from the Drafts folder and append a new word at the end of the first line.

Result: The paragraph is not wrapped correctly; the appended word is on a line by itself despite not being the last word of the paragraph.

Expected result: The appended word should not be on a line by itself since it is not the last word in the paragraph.

ProblemType: Bug
Architecture: i386
Date: Thu Jun 14 00:21:24 2007
DistroRelease: Ubuntu 7.04
Package: mozilla-thunderbird 1.5.0.12-0ubuntu0.7.04
PackageArchitecture: i386
SourcePackage: mozilla-thunderbird
Uname: Linux karlan 2.6.20-16-generic #2 SMP Thu Jun 7 20:19:32 UTC 2007 i686 GNU/Linux

Revision history for this message
August Karlstrom (fusionfive) wrote :
Revision history for this message
Roberto Sarrionandia (rbs-tito) wrote :

I've just tried to reproduce the bug, were those 100 chars all in one word? Because Thunderbird will reorganise text so it is all visible from a window like a word processor.

Revision history for this message
August Karlstrom (fusionfive) wrote :

Roberto Sarrionandia wrote:
> I've just tried to reproduce the bug, were those 100 chars all in one word?

No, blanks are included. After point 3 in my description I get a paragraph that looks something like:

xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
xxx
xxx xxx xxx xxx xxx xxx

The second line is not properly filled.

Changed in thunderbird:
assignee: nobody → mozilla-bugs
Revision history for this message
In , Mkmelin+mozilla (mkmelin+mozilla) wrote :

*** Bug 387318 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Crla2l002 (crla2l002) wrote :

What are we waiting for here? Looks like the patch is reviewed and ready to checkin ...

Revision history for this message
In , Aqualon (aqualon) wrote :

If the r+ can be transfered from v3.2 to v4 of the patch, this is ready for checkin, but you'll have to ask David about it.

Revision history for this message
In , Bienvenu (bienvenu) wrote :

(From update of attachment 260183)
sorry, this one got past me. Looks good, thx for the patch.

Revision history for this message
In , Reed Loden (reed) wrote :

Checking in mailnews/compose/src/nsMsgCompose.cpp;
/cvsroot/mozilla/mailnews/compose/src/nsMsgCompose.cpp,v <-- nsMsgCompose.cpp
new revision: 1.530; previous revision: 1.529
done

Revision history for this message
In , mjc (mjc-avtechpulse) wrote :

Thank you!

Revision history for this message
In , Mcow (mcow) wrote :

Verified fixed with TB 3a1p-1013, Win2K

Thank you thank you thank you, Andriy! You have nailed my top two most irritating bugs!

Revision history for this message
In , Andrit (andrit) wrote :

Unfortunately the fix does not take into account signature delimiter "-- " and as result behaves incorrectly with it. I will try to fix this ASAP.

Mike, do you know whether there is new bug opened for this already? Thank you.

Revision history for this message
In , Andrit (andrit) wrote :

and "- -- " case as well (see bug 99922 for details, "- -- " is signature delimiter in PGP-signed mails)

Revision history for this message
In , Andrit (andrit) wrote :

Created an attachment (id=289216)
patch to handle "-- " (signature delimiter) correctly

Here is the patch to already checked in fix4 that handle correctly "-- " and "- -- " delimiters.

Revision history for this message
In , Andrit (andrit) wrote :

Created an attachment (id=289225)
patch5.1 to handle "-- " (signature delimiter) correctly

patch5 adjusted a bit

Revision history for this message
In , Tobias-saar (tobias-saar) wrote :

*** Bug 409580 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Tobias-saar (tobias-saar) wrote :

To clearify, Bug 409580 was only an Duplicate to the regression Andriy reported in comment c#68.
The review-awaiting patch 5.1 works fine almost under Linux, so is there any chance to get an positiv review from David Bienvenu for this? Would be very great.

Revision history for this message
In , Bienvenu (bienvenu) wrote :

(From update of attachment 289225)
I'm willing to give it a try - if you could just make the braces in this part:

+ if (body[i] == '>') {
+ quote = PR_TRUE;
+ continue;
+ }

so that the brace after the if () is on it's own line, that would be great.

thx for the patch!

Revision history for this message
In , Andrit (andrit) wrote :

Created an attachment (id=294946)
patch5.2: style adjusted a bit in patch5.1

Thanks David. Here it is.

Revision history for this message
In , Mkmelin+mozilla (mkmelin+mozilla) wrote :

(From update of attachment 294946)
You don't need any more reviews for this.

Revision history for this message
In , Reed Loden (reed) wrote :

Checking in mailnews/compose/src/nsMsgCompose.cpp;
/cvsroot/mozilla/mailnews/compose/src/nsMsgCompose.cpp,v <-- nsMsgCompose.cpp
new revision: 1.538; previous revision: 1.537
done

Revision history for this message
In , Mkmelin+mozilla (mkmelin+mozilla) wrote :

*** Bug 435972 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Johanneswillenborg (johanneswillenborg) wrote :

This bug is not yet solved:

Build Identifier: Version 2.0.0.14 (20080421)

Thunderbird does not correctly handle messages that are continued from a draft.
While line wrapping works as expected when writing a message it does not when a
message is saved to "Drafts" and later continued. It seems like only formerly
written lines are saved "wrapped" and newly added lines are not handled at all.

Reproducible: Always

Steps to Reproduce:
1. Open "new" message
2. Write some lines without return
3. Close message and save to "Drafts"
4. Continue message with some more lines and send message
5. Check "Sent" for message or check received message
Actual Results:
Message is not wrapped correctly.

Expected Results:
Message should be wrapped after 72 characters (like the saved part of the
message is).

Standard (default) theme was used. Standard MacBook was used. Enigmail Add-on
used. Error occurs without having installed Enigmail, too.

Revision history for this message
In , Mkmelin+mozilla (mkmelin+mozilla) wrote :

To see the fix, you need a nightly or the latest 3.0 alpha
http://www.mozillamessaging.com/en-US/thunderbird/early_releases/

Revision history for this message
In , Cybah (jon-cybah) wrote :

Is this likely to end up in Thunderbird 2? I couldn't easily find any roadmap info stating plans for Thunderbird 2 and 3.

Revision history for this message
In , Mkmelin+mozilla (mkmelin+mozilla) wrote :

No this is tb3 (and seamonkey2) only.

Revision history for this message
Mackenzie Morgan (maco.m) wrote :

Are you still experiencing this bug with Thunderbird 2?

Changed in thunderbird:
status: New → Incomplete
Revision history for this message
August Karlstrom (fusionfile) wrote :

Yes, the problem remains in TB 2.0.

Revision history for this message
Mackenzie Morgan (maco.m) wrote :

Forwarded upstream.

Changed in thunderbird:
status: Incomplete → New
Changed in thunderbird:
status: Unknown → New
Revision history for this message
In , Mkmelin+mozilla (mkmelin+mozilla) wrote :

*** Bug 456640 has been marked as a duplicate of this bug. ***

Changed in thunderbird:
status: New → Invalid
Changed in thunderbird:
status: Invalid → Unknown
Changed in thunderbird:
status: Unknown → Fix Released
Revision history for this message
Mackenzie Morgan (maco.m) wrote :

This is fixed in Thunderbird 3.

Changed in thunderbird:
importance: Undecided → Low
status: New → Triaged
Revision history for this message
John Vivirito (gnomefreak) wrote :

Thunderbird 3.0 "should" make it into next dev cycle. depending on regressions or blocker bugs but so far looks good.

Revision history for this message
In , Mkmelin+mozilla (mkmelin+mozilla) wrote :

*** Bug 470878 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Rsx11m-pub (rsx11m-pub) wrote :

*** Bug 474224 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Rsx11m-pub (rsx11m-pub) wrote :

*** Bug 522963 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Mkmelin+mozilla (mkmelin+mozilla) wrote :

*** Bug 492637 has been marked as a duplicate of this bug. ***

Micah Gersten (micahg)
Changed in thunderbird:
milestone: none → 3.0
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (6.7 KiB)

This bug was fixed in the package thunderbird - 3.0+nobinonly-0ubuntu1

---------------
thunderbird (3.0+nobinonly-0ubuntu1) lucid; urgency=low

  * New Upstream Release 3.0 (THUNDERBIRD_3_0_RELEASE)
    - LP: #50902 - Thunderbird displays useless dialog
    - LP: #52667 - Thunderbird doesn't support RFC-2369
    - LP: #49033 - Doesn't recognize upper case extension (.JPG)
    - LP: #56465 - Per folder column widths
    - LP: #68456 - CTRL-Shift-K bound to 2 functions
    - LP: #79337 - Typo in Server Information for Add Account Wizard
    - LP: #1084 - No scroll on full headers list
    - LP: #62071 - Middle click on scrollbar pastes instead of jumping
    - LP: #119358 - Weak default authentication mode
    - LP: #120672 - No option to empty junk folder with right click
    - LP: #96566 - movemail doesn't work with default privs
    - LP: #122529 - Non-Thunderbird IMAP folders not visible to Thunderbird
    - LP: #241276 - Not able to paste image into thunderbird compose window
    - LP: #244635 - scrollboxes scroll to offset 0 when resized
    - LP: #259387 - "Edit Message as New" broken for eml messages
    - LP: #120281 - Editing a message from the drafts folder leaves line breaks
    - LP: #115484 - Dialogue boxes too large for 1024x768 resolution
    - LP: #320034 - Mail with self referencing headers breaks threading
    - LP: #160794 - shortcuts different in windows and linux
    - LP: #280987 - thunderbird keeps asking a password when working off-line
    - LP: #369150 - Thunderbird splits email addresses with non-ascii characters
                    and a comma in From: field
    - LP: #135066 - Thunderbird doesn't use Ubuntu icon theme
    - LP: #297301 - after authentication error the password is forgotten
    - LP: #487541 - thunderbird-bin crashed with SIGSEGV (AFS filesystem)
    - LP: #485224 - Thunderbird saves double attachment file name endings on
                    FAT32 and NTFS
    - LP: #482496 - When using SCIM ANTHY, autosaving fails, and then get asked
                    about sending in UTF-8

  [ Fabien Tassin <email address hidden> ]
  * Add build-depends on autoconf2.13, autotolls-dev, mozilla-devscripts
    libglib2.0-dev (>= 2.12), libstartup-notification0-dev, libbz2-dev,
    libpixman-1-dev, libdbus-1-dev (>= 1.0.0), libdbus-glib-1-dev (>= 0.60),
    libhal-dev (>= 0.5.8), libasound2-dev, libreadline5-dev | libreadline-dev,
    libkrb5-dev
  * Update build-depends minimums for libx11-dev (>= 2:1.0),
    libgtk2.0-dev (>= 2.12), zlib1g-dev (>= 1:1.2.3), libpng12-dev (>= 1.2.0),
    libjpeg62-dev (>= 6b), libcairo2-dev (>= 0.5.8), libgnome2-dev (>= 2.16),
    libgnomevfs2-dev (>= 1:2.16), libgnomeui-dev (>= 2.16),
    libnss3-dev (>= 3.12.0~1.9b3)
  * Bump standards version to 3.8.0
  * Replace ${Source-Version} by ${binary:Version} in control file
    - update debian/control
  * Bump requirement for system nspr to >= 4.8 since Mozilla bug 492464 landed
  * Bump requirement for system nss to >= 3.12.3 since Mozilla bug 485052 landed
  * Use in-source hunspell when hunspell 1.2 is not available
  * Add conditionnal support for --with-libxul-sdk controlled by
    $(USE_SYSTEM_XUL)
    - update debian/rules
  * Add p...

Read more...

Changed in thunderbird (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
In , jpfle (jpfle) wrote :

I still have this bug on this configuration:

- Thunderbird 3.0.3
- Gnome 2.29.92
- Ubuntu 10.04 Beta 1

To reproduce the bug, I just have to save a draft, and reopen it for modification.

Changed in thunderbird:
importance: Unknown → Medium
Revision history for this message
dreamon (dreamon) wrote :

I can confirm that this bug still exists in Thunderbird 3.1.7 on Ubuntu 10.10 and has *not been fixed*.

To reproduce the bug, set up a standard installation of Thunderbird (all settings on default, no extensions installed), create a new email and type in some random text (let's say more than 200 characters). Thunderbird will by default wrap lines at 72 characters. However, when the email is saved as a draft and reopened later, it contains hard returns at the positions where text has been wrapped before. When adding new content, lines now all break at the wrong position, which has to be corrected manually using the [del] key.

To illustrate the problem I have set up a new email, put in some sample Lorem Ipsum text and saved it as a draft. After reopening the email I added new text to the second sentence. Note how Thunderbird retains the original wrap positions as hard line breaks instead of continuing the original text after the word "HERE":

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum NEW
TEXT ADDED HERE
ultrices posuere nibh sit amet auctor. Aliquam ut nisl augue. Mauris ac
lacus quam.

This is a very major bug which makes using drafts nearly impossible. Could somebody with the necessary priviledges please reopen the bug report? Also, if more information is required, please don't hesitate asking.

Revision history for this message
In , jpfle (jpfle) wrote :

After all these years, I finally found that I was still experiencing this bug (see my comment 88) because of the addon Enigmail, that automatically sets "mailnews.send_plaintext_flowed" to "false".

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.