Open Bug 302009 Opened 20 years ago Updated 3 years ago

Paste as Quotation adds an extraneous new line, unless buffer ends with \n

Categories

(MailNews Core :: Composition, defect)

defect

Tracking

(Not tracked)

People

(Reporter: davidmaxwaterman, Unassigned)

Details

User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b4) Gecko/20050720 Firefox/1.0+ Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b4) Gecko/20050720 Firefox/1.0+ If you cut and paste with quoting, it adds extraneous new lines. I often cut text from a message and add it again as quoted text since doing so stops the word wrap which is undesirable in some parts of a message. However, pasting with quotes seems to add a couple of extra newlines, which is annoyoing. Regular pasting doesn't add any extra lines. Ideally, there should be a way to simply remove wrapping from selected text, but that's probably an RFE (or is there a way?). Reproducible: Always Steps to Reproduce: 1.compose a message 2.cut a line by selecting a line, and pressing cmd-x 3.paste it with shift-cmd-v Actual Results: extra newlines are added after the pasted text Expected Results: no extra lines
Do you see a difference between copying from an HTML message and a plain text message? How about if the plain text message is format=flowed or not? (To check that, View | Message Source and locate the Content-Type for text/plain -- it either will, or will not, have "format=flowed" as part of the header.) Do you see a similar problem when copying from some other text source -- Firefox, a word processor, a plain-text editor? See bug 118629. How are you performing the selection -- using mouse or Shift+<navigation keys>? Please describe this in detail.
(In reply to comment #1) > Do you see a difference between copying from an HTML message and a plain text > message? I don't use HTML. I am talking about plain text. > How about if the plain text message is format=flowed or not? > (To check that, View | Message Source and locate the Content-Type for > text/plain -- it either will, or will not, have "format=flowed" as part of the > header.) I don't have any 'Message Source' on my 'View' menu - it only has : " Toolbars Contacts sidebar ---------------- Message security info " I am using "version 1.0+ (20050714)" > > Do you see a similar problem when copying from some other text source -- > Firefox, a word processor, a plain-text editor? If I copy from a 'Terminal' window, I get an extra new line: eg ('|' is the cursor) with the message as : " > > |> > " selecting ('-' indicates selection with the mouse - ie not including the new line): " Welcome to Darwin! ------------------ " and selecting 'Edit/paste as quoatation' causes: " > > > Welcome to Darwin! > > " Same behaviour from Firefox. If I start with : " 1 2 3 4 " and select : " 1 2 3 4 " with the '2' highlighted (not including the new line - can be done by double-clicking the '2'), do a 'cut' (cmd-x), which results in : " 1 3 4 " then do a paste-as-quotation, which results in : " 1 > 2 3 4 " If I also cut the 'newline' (by dragging down from the start of the '2' line) it results in : " 1 3 4 " and then a paste-as-quotation results in : " 1 > 2 3 4 " which is as expected. It seems to me that this bug only happens when you select from the beginning of the line to the end of the line - and not to the beginning of the next line. If you also select the newline, then it pastes as expected (no unexpected new lines at all. Another example : " this is all one line this is all one line this is all one line this is all one line this is all one line this is all one line this is all one line this is all one line this is all one line this is all one line this is all one line this is all one line this is another long line this is another long line this is another long line this is another long line this is another long line this is another long line this is another long line this is another long line this is another long line this is another long line and a third and a third and a third and a third and a third and a third and a third and a third and a third and a third and a third and a third and a third and a third " when cut/pasteAsQuotation the second line (starts with 'this is another long line') with the newline gives : " this is all one line this is all one line this is all one line this is all one line this is all one line this is all one line this is all one line this is all one line this is all one line this is all one line this is all one line this is all one line > this is another long line this is another long line this is another long line this is another long line this is another long line this is another long line this is another long line this is another long line this is another long line this is another long line and a third and a third and a third and a third and a third and a third and a third and a third and a third and a third and a third and a third and a third and a third " as expected, but selecting from the beginning to the end of the second line, gives : " this is all one line this is all one line this is all one line this is all one line this is all one line this is all one line this is all one line this is all one line this is all one line this is all one line this is all one line this is all one line > this is another long line this is another long line this is another long line this is another long line this is another long line this is another long line this is another long line this is another long line this is another long line this is another long line and a third and a third and a third and a third and a third and a third and a third and a third and a third and a third and a third and a third and a third and a third " It seems like there are too many 'new lines' there. > > See bug 118629. How are you performing the selection -- using mouse or > Shift+<navigation keys>? Please describe this in detail. I am using the mouse. Max.
(In reply to comment #2) > I don't have any 'Message Source' on my 'View' menu I was talking about the Message Source of the message from which I thought you were copying text. I'd missed that you were pasting your own typing as quotation. > It seems to me that this bug only happens when you select from the beginning > of the line to the end of the line - and not to the beginning of the next > line. Or even a snippet of text out of the middle of the line. > If you also select the newline, then it pastes as expected (no unexpected new > lines at all). You're right -- if the clipboard buffer ends with a newline, P-as-Q pastes the lines, quoted, immediately before the cursor; but if the buffer does not have a blueline, the quoted text is followed by a superfluous, extra line. Reproduced with TB 1.0+0803, Moz 1.7.11, Win2K. Updating platform/OS, severity, moving to Core. Bug 159597 is talking about the same basic problem, but complaining that if you type on that superfluous extra line, the typed text is shown blue.
Assignee: mscott → nobody
Severity: normal → minor
Status: UNCONFIRMED → NEW
Component: Message Compose Window → MailNews: Composition
Ever confirmed: true
OS: MacOS X → All
Product: Thunderbird → Core
Hardware: Macintosh → All
Summary: pasting w/quote adds extraneous new lines → Paste as Quotation adds an extraneous new line, unless buffer ends with \n
Version: unspecified → Trunk
QA Contact: composition
Product: Core → MailNews Core
Still repro. Thunderbird 52.1.0 (32-bit) Windows 7 64-bit
I have an at least similar problem, on Windows, using Thunderbird 52.5.2. I can test on Linux if needed. I copy text to the buffer, position the caret carefully within a composition window, paste via the context menu and . . the pasted text ends up a line *below* the caret. Clearly, not good. I have just seen how old this bug is, too . .
Severity: minor → S4
You need to log in before you can comment on or make changes to this bug.