Bug 569834 - Broken bidirectional support after 4.7.3a, making the cursor position inconsistent with text direction
Summary: Broken bidirectional support after 4.7.3a, making the cursor position inconsi...
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.8   Edit
Hardware: PC All
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-19 12:57 EST by Mohamad Fakih CLA
Modified: 2020-12-22 20:02 EST (History)
2 users (show)

See Also:


Attachments
Eclipse 4.11 (39.21 KB, image/png)
2020-12-19 12:57 EST, Mohamad Fakih CLA
no flags Details
4.7.3a (36.44 KB, image/png)
2020-12-19 12:59 EST, Mohamad Fakih CLA
no flags Details
Globalization settings (32.16 KB, image/png)
2020-12-19 12:59 EST, Mohamad Fakih CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mohamad Fakih CLA 2020-12-19 12:57:56 EST
Created attachment 285082 [details]
Eclipse 4.11

Eclipse 4.7.3a, to my investigation, was the last version to fully support writing in right-to-left direction, and getting the heading in the outline view in the correct orientation (see screenshot "Eclipse 4.7.3a"). However, after the upgrade, and in all major versions published on the Eclipse website, including the latest one, a severe problem occurred:

When eclipse is run with "-dir rtl", or the Globalization settings were both set to "Righ-to-left" (see screenshot "Globalization"), the text will display from right-to-left both in direction and alignment (as it's supposed to be), yet the cursor remain left aligned, and so out of sync with the text i.e. if you click over the first letter (near the right edge of the editor), the cursor will show near the left edge of the editor, and vice versa. If you click near 1/3 from the right, the cursor will show 1/3 from the left ... (see sample screenshot "Eclipse 4.11").

Another problem is the display of latin (ltr) terms, so "doc.md" was displayed mirrored (see screenshot), and so hardly readable.

How to reproduce:

Type "أكل الولد التفاحة" (wihtout quotes) in the editor (tested with the plain and Mylyn WikiText editor), after setting the IDE layout to RTL (as mentioned at the beginning), then click on any letter. You'll see the cursor does not show where you clicks (although if you type, your edit will be in the right place).
Comment 1 Mohamad Fakih CLA 2020-12-19 12:59:09 EST
Created attachment 285083 [details]
4.7.3a
Comment 2 Mohamad Fakih CLA 2020-12-19 12:59:35 EST
Created attachment 285084 [details]
Globalization settings