Closed Bug 630693 Opened 14 years ago Closed 14 years ago

Web console's copying adds extra newline between groups.

Categories

(DevTools :: General, defect)

defect
Not set
trivial

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: unusualtears, Assigned: rcampbell)

References

Details

(Whiteboard: [has-patch])

Attachments

(1 file, 1 obsolete file)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.8) Gecko/20100729 Iceweasel/3.6.7 (like Firefox/3.6.7) Build Identifier: 4.0b11pre (2011-02-01) toolkit/components/console/hudservice/HUDService.jsm:copySelectedItems():2860 calls strings.push("\n"), and then later strings.join("\n"). That means there are extra newlines being inserted. Reproducible: Always Steps to Reproduce: 1. Make sure multiple lines in the web console 2. cmd+A 3. cmd+C 4. Paste in a text editor Actual Results: Groups are separated by two newlines. Expected Results: Groups are separated by single newline. I'll attach a patch as well, but the only thing other than removing the newline from the push() is updating the comment above it.
this will be fixed by bug 611795.
Assignee: nobody → rcampbell
Status: UNCONFIRMED → ASSIGNED
Depends on: 611795
Ever confirmed: true
I thought this behavior was actually intentional to make it easier to spot request boundaries. cc'ing Patrick to see what he thinks.
that may be, but I thought it looked messy. I've replaced the extra newline with a couple of dashes.
Yeah, it was intentional (I think... been a while). Feel free to change it though.
I don't believe this bug was fixed, probably lost those bits along the review path. I'd like to update this patch so it applies cleanly and instead of replacing the newline with an empty string, replace it with a pair of dashes to indicate separation. Adam, did you want to update it?
I didn't add a test, but can do so if needed.
Attachment #508906 - Attachment is obsolete: true
Comment on attachment 515255 [details] [diff] [review] [checked-in] Replace newline with a pair of dashes, updates comment. Awesome thanks!
Attachment #515255 - Flags: review?(sdwilsh)
Attachment #515255 - Flags: feedback+
Whiteboard: [has-patch]
Comment on attachment 515255 [details] [diff] [review] [checked-in] Replace newline with a pair of dashes, updates comment. r+a=beltzner, trivial patch with strong benefit
Attachment #515255 - Flags: review?(sdwilsh)
Attachment #515255 - Flags: review+
Attachment #515255 - Flags: approval2.0+
Comment on attachment 515255 [details] [diff] [review] [checked-in] Replace newline with a pair of dashes, updates comment. http://hg.mozilla.org/mozilla-central/rev/51aca1e8e3f8
Attachment #515255 - Attachment description: Replace newline with a pair of dashes, updates comment. → [checked-in] Replace newline with a pair of dashes, updates comment.
Thanks so much for the patch, Adam!
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Verified
Status: RESOLVED → VERIFIED
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: