Bug 562677

Summary: Can't properly highlight multiple selection in a StyledText line (a TextLayout instance)
Product: [Eclipse Project] Platform Reporter: Mickael Istria <mistria>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: gautier.desaintmartinlacaze
Version: 4.16   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 562676    

Description Mickael Istria CLA 2020-04-30 17:14:55 EDT
Currently, TextLayout doesn't support multiple selected range (one selectionStart and one selectionEnd item in constructor).
The hack used by bug 562676 at the moment consists in drawing the line multiple times with different selection ranges as the background color which is one of the main feedback for selection seems to not be overridden between draws, but that's suboptimal since the newer drawing can override some pixels from former drawing like for example the actual text color, so a text that's supposed to be white on blue background because is selected can appear as black on blue background because is was redrawn with non-matching selection parameters.