Bug 485700 - [Win32] StyledText replaceTextRange incorrectly changes current selection
Summary: [Win32] StyledText replaceTextRange incorrectly changes current selection
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.5.1   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2016-01-12 14:13 EST by Shi-Ke Xue CLA
Modified: 2020-05-25 17:26 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Shi-Ke Xue CLA 2016-01-12 14:13:35 EST
When replaceTextRange is called, if the current selection is after the replaced text then the selection is adjusted so that the same text is selected. However, the direction of selection is always modified to be left-to-right, even if the original selection was right-to-left.

This means that if replaceTextRange is called while a selection is being made, the behavior is incorrect. If the selection is being dragged right-to-left, then modifying the direction causes the original selection to be lost entirely. 

This is easy to reproduce - call replaceTextRange while a selection is made after the replaced text. This happens on both Windows 10 and Mac OS X.
Comment 1 Niraj Modi CLA 2016-01-13 08:32:41 EST
Do you have a test snippet handy, to reproduce this problem at our end ?
Comment 2 Eclipse Genie CLA 2020-05-25 17:26:58 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.