Community
Participate
Working Groups
Build Identifier: 3.6.1.v3659 In TextForms that use HTML tags for formatting the text is split up in segments of the same formatting. If a line consists of more than one segment, selecting and copying text from this line causes all segments preceding the selected text to be copied as well. PATCH: I think the bug is in TextSegment.computeSelection. The first if-condition in the method should be "(firstRow && bounds.x < leftOffset)" instead of "(firstRow && bounds.x + swidth > leftOffset)". This way sstart would be set to s.length and no text would be added to the selection. I am not set up to build Eclipse or SWT right now so I could not test the code. Could this also be nominated for inclusion in 3.6.2? We are planning to releasing an RCP app based on 3.6.2. Unfortunately, I am unable to wait to the release of 3.7.0. Reproducible: Always Steps to Reproduce: 1. Create a new Plug-in project in eclipse. Use the 'RCP Application with a view' as template. 2. Replace the code in view.java with the attached file and adjust the package 3. Run the application 4. Copy the word 'normal' form the TextForm 5. Paste it to any text editor. 6. The copied text is 'Boldnormal'
Created attachment 187855 [details] Example code
I agree with your suggested change to the code. It is too late to get this into 3.6.2 but I will get the fix into Eclipse 3.7 if no problems are discovered in testing.
Created attachment 188184 [details] Patch
Patch applied to HEAD, Fixed.