Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 366335 - Text control with SWT.SINGLE style on Cocoa does not remove newline breaks
Summary: Text control with SWT.SINGLE style on Cocoa does not remove newline breaks
Status: RESOLVED DUPLICATE of bug 273470
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.7.1   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-11 10:35 EST by CLA
Modified: 2011-12-12 03:50 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description CLA 2011-12-11 10:35:29 EST
On Mac Cocoa:

1. Create a Text Control with the SWT.SINGLE style.
2. Copy the following text lines to the system clipboard:

Here is some text
with some
new line
breaks

3. Paste (Command-V) this text into the Text control.

Result - the Text control displays the first line of text, but pressing the down arrow key when the control has the focus reveals the other lines of text. The newline characters are left in.

This is not the case with the Text control on Carbon, where newline characters are replaced with " " characters and all text is visible on a single line.
Comment 1 CLA 2011-12-11 10:47:40 EST
Further information:

On Windows, pasted multi-line text is curtailed up to the first newline character.

On Cocoa, with the SWT.SEARCH style in addition to SWT.SINGLE the newline characters are stripped from the pasted multi-line text.
Comment 2 Lakshmi P Shanmugam CLA 2011-12-12 03:50:54 EST
Duplicate of Bug 273470

*** This bug has been marked as a duplicate of bug 273470 ***