vscode: ♿❗Breaking Issue - RTL Support❗🚑

This text

Screenshot 2022-02-05 071006

Screenshot 2022-02-05 070926

Most look like this:

Screenshot 2022-02-05 070826

Looks correct without that English word:

Screenshot 2022-02-05 071716


Screenshot 2022-02-05 072308


1-with-numbers-min 2-min

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 2
  • Comments: 24 (1 by maintainers)

Most upvoted comments

This issue is a disaster, We should have separate issues for each problem and track each one on its own issue rather than mixing them in just one

@babakfp That confusion is cleared up in later comments.

Also, it’s not all about the text being on the right side / starting from right to left

No, it’s not. I would say that isn’t even the main issue. There are actually a number of issues around this, e.g.:

  • RTL1 LTR RTL2 needs to reverse direction and read RTL2 LTR RTL1
  • Parentheses (and other pair characters) need to be visually reversed if they’re surrounding RTL text
  • Sets of numbers should not reverse direction within RTL text

And what makes this all worse, is that VS Code has a lot of custom positioning around cursor/selection placement that has to handle all of this.

All of this is covered in various comments in that thread, and in linked issues.

@TylerLeonhardt Come on. Such a big issue doesn’t deserve to get closed. I understand that when a problem doesn’t affect us, we just don’t care about it. But here I’m asking you guys to help to solve this major problem. Please reopen the issue. I’m available on Telegram https://t.me/babakfp to help you guys on this topic. Ask me your questions.

@alexdima (have a look at my explanation) @HamzaAbdullahMoh @chadidi @danyeh (😑) @Kalmuraee @janbaltus (dude👍) @Aminadav @saibimajdi @ahamidou @mahrousfci @eyalalonn @elkebirmed @kazemihabib @atlanteh @iddan @kookma @Parsoa @athamzaabdullah (read the explanation in this comment, that’s why this problem isn’t a priority) @urielha @omidgolparvar (این مشکل هنوز حل نشده ولی تو احتمالا الان پدر شدی😂😂) @akosyakov @Javanmardi @tomerm @adir01 @amirbrans @amer1616 @jb6 @nathangibson @MSKhodadady (Telegram also have problems with RTL, but it’s better than vsCode) @KL13NT @Kagetsuki @VehpuS @NotWearingPants @rafidka @lior5654 (2022 😂) @TheEhsanSarshar (feel free to contact me on Telegram https://t.me/babakfp) @AhmedElTabarani @marktani @ebraminio (۲۰۲۲ انگار نه انگار) @michael-james @sarmadka @lwcvl @drewpotter @fireheart2008 @RaiKoHoff @hpwamr @zspitz @avipars @sixtyfive @RexNext @chromer030 @amiria703

And what makes this all worse, is that VS Code has a lot of custom positioning around cursor/selection placement that has to handle all of this.

That doesn’t sound correct. Let’s walk through with an example because if I read this tomorrow, I probably going to get confused😂. This is the text in Farsi/Persian:

Screenshot 2022-02-05 111217

If I understand it correctly, you are saying that if the second letter was in English, it should be placed at the cursor’s first position. So it’s going to be like this:

Screenshot 2022-02-05 111643

This isn’t right because nothing about the input should change!. This is the correct example: Screenshot 2022-02-05 111833

Same as how it works on the web. If I copy a mixed lang text like (سلام babakfp خوبی؟) from the vsCode and paste it somewhere on the web, it should look the same (and vice versa).


The biggest and breaking issue here is this:

This text

Screenshot 2022-02-05 071006

Most look like this:

Screenshot 2022-02-05 070826

(Not talking about the text being on the right side).

I can explain and talk about other RTL issues but I’m afraid no one is going to fix them, same as this one.


Parentheses (and other pair characters) need to be visually reversed if they’re surrounding RTL text Sets of numbers should not reverse direction within RTL text

Any visual examples?