| Summary: | Text limit for Text widget doesn't work in some cases | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Lakshmi P Shanmugam <lshanmug> | ||||
| Component: | SWT | Assignee: | Lakshmi P Shanmugam <lshanmug> | ||||
| Status: | RESOLVED FIXED | QA Contact: | Silenio Quarti <Silenio_Quarti> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | Silenio_Quarti | ||||
| Version: | 3.7 | Flags: | Silenio_Quarti:
review+
|
||||
| Target Milestone: | 3.7 RC1 | ||||||
| Hardware: | PC | ||||||
| OS: | Mac OS X | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Created attachment 192541 [details]
patch
Hi Silenio, Can you please review for M7? Patch is good. Fixed in HEAD > 20110502. Thanks Silenio. |
Reproducible with Cocoa HEAD. Came across this while working on a different Text bug. Text.append(), insert(), paste() don't check for textlimit before changing the text. Test snippet: public static void main(String[] args) { Display display = new Display(); Shell shell = new Shell(display); shell.setSize(200, 75); GridLayout layout = new GridLayout(1, false); shell.setLayout(layout); Text text = new Text(shell, SWT.BORDER|SWT.MULTI); text.setLayoutData(new GridData(GridData.FILL_BOTH)); text.setTextLimit(6); text.setText("124"); text.insert("456789"); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); }