Bug #58860 Improve views editor to use 'OS native' line termination
Submitted: 10 Dec 2010 10:55 Modified: 13 Sep 2013 12:58
Reporter: Craig Fowler Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S4 (Feature request)
Version:5.2.31 OS:Linux (Debian Testing, both 32 & 64-bit using Ubuntu 10.04 .deb package)
Assigned to: CPU Architecture:Any
Tags: editor, line-break, UI

[10 Dec 2010 10:55] Craig Fowler
Description:
The text editor component that provides the VIEWs editor seems to be configured to always use Windows-style line-termination (CRLF) seemingly regardless of which OS Workbench is running on.

I presume that the editor component has then been configured within WB to suppress any visual glitches that might occur due to non-native line termination.

This is really only visible when copy-pasting from Workbench into other editor programs - since the other native applications then display those visual glitches with the pasted text.

It's more of an annoyance than a real bug - but it would be a useful improvement I think that might make Workbench play more nicely with other applications on the same OS.

How to repeat:
Using Workbench installed on Linux, create a new view and enter some DDL for that view.

Copy-paste that DDL text out to another text editor (I use KDE's Kate editor but perhaps it is reproducible with other editors).

There are visual glitches at the line-endings (in Kate using the font 'DejaVu Sans Mono' these are displayed as musical note symbols at the end of each line).

Saving that file in Kate and then checking with a hex editor reveals that the text that was copy-pasted contained CRLF rather than just LF as a Unix system would expect.

Suggested fix:
Either, automatically format the text within the views editor using the operating system's native line termination or perhaps offer a configuration option so that the user can decide between "Windows, Unix, Mac or 'native'" line termination.
[10 Dec 2010 12:12] Valeriy Kravchuk
Thank you for the feature request.
[13 Sep 2013 12:58] Craig Fowler
I am not sure in exactly which version this was fixed, but this issue has been resolved for some time.  It's certainly not repeatable in v6.0.7.