Bug #63753 | Copied text from value editor has extra lines between existing lines | ||
---|---|---|---|
Submitted: | 14 Dec 2011 22:07 | Modified: | 27 Jul 2012 8:17 |
Reporter: | Bob Dankert | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Workbench: SQL Editor | Severity: | S2 (Serious) |
Version: | 5.2.36 | OS: | Windows (W7 64) |
Assigned to: | CPU Architecture: | Any | |
Tags: | copy, line, value editor |
[14 Dec 2011 22:07]
Bob Dankert
[18 Dec 2011 17:36]
Valeriy Kravchuk
Please, send exact CREATE TABLE statement for the table you tried to edit and specify what column you opened in value editor.
[21 Dec 2011 18:02]
Bob Dankert
It's really quite easy, any multiline text field will work. Here's an example: create table linetest (field text); insert into linetest values ('First Line\nSecond Line\nThird Line'); select * from linetest; In the results in workbench, right click on the field, click "Open Value in Viewer". Select all the text (right click, select all), copy the text (right click, copy, or Ctrl-C), and inspect the clipboard. The contents will be: First Line\r\r\nSecond Line\r\r\nThird Line\r\r\n If instead of copying the field from the "Value Viewer" window, if you right click on the field in Workbench and select "Copy Field Content" (quoted or unquoted, it doesn't matter), then inspect the clipboard. The contents will be: First Line\r\nSecond Line\r\nThird Line Note that this is now \r\n instead of the inserted \n, although this is likely due to it being on Windows and Windows using \r\n by default. None-the-less, copying the text from the value viewer causes it to copy \r\r\n for each \n instance. I viewed the contents of the clipboard in a couple methods. I first noticed it by pasting into EditPadPro, which I have set to visually show carriage returns and line feeds. I also created a basic windows application which shows the contents of the clipboard, using Clipboard.GetText() in C# - this confirmed my findings. Let me know if there is any additional information you need to verify this bug.
[22 Dec 2011 8:55]
Valeriy Kravchuk
File with value pasted...
Attachment: a.txt (text/plain), 39 bytes.
[22 Dec 2011 8:56]
Valeriy Kravchuk
Verified on Windows XP.
[27 Jul 2012 8:17]
Philip Olson
Fixed as of Workbench 5.2.41, and here's the changelog entry: After right-clicking on a value in the SQL editor and choosing Open Value in Viewer, selecting the text would insert extra new lines into the clipboard.