Layout problems with bidirectional text lines #91074
Labels
*duplicate
Issue identified as a duplicate of another issue(s)
editor-rendering
Editor rendering issues
feature-request
Request for new features or functionality
Milestone
I've just come across a bug in how VS Code handles bidi text on Windows. First off it gets it wrong in one way, but then it changes the display order to get it wrong in a whole different way when I triple-click to select the line.
The logical order of the text is Hebr1 Hebr2 Hebr3 Latn1 Hebr4 Hebr5 Hebr6. which should display RTL, with word Latn1 between Hebr3 (to the right) and Hebr4 (to the left), Hebr1 at the start (right) and Hebr6 at the end (left).
To start with, VS Code shows me the text in chunks, with chunks internally in the correct direction and the chunks in logical order: [Hebr3 Hebr2 Hebr1] [Latn1] [Hebr6 Hebr5 Hebr4]. But triple-click and I get each word internally in the correct direction (so 1rbeH, as it were) but with the words in logical order (so 1rbeH 2rbeH 3rbeH Latn1 4rbeH 5rbeH 6rbeH).
This behaviour occurs both if the bidi text is within a larger HTML file (surrounded by LTR text) or alone in a file (so just bidi text, mainly RTL, in an LTR operating system).
Steps to Reproduce:
אורך צילום הווידאו עד כ-5 דקות. גודל הקובץ: 1 דקה \ 600MB.
This is 2 sentences:
As an aside, the text order when selected might be deliberate — it could be considered a solution to issue #83365
These screenshots show the bidi text when unselected, selected and on the page (in that order). There are 2 examples, 1 of text inside
<p> ... </p>
tags (attached as Bidi text paragraph.html.txt) and 1 of text alone on a line (attached as Bidi text line.txt). In both cases, the screenshot from a browser (the non-monospaced font) is the correct word order for a user to read, and both screenshots from VS Code (monospaced) are incorrect in the ways described above. (The fonts are Open Sans Hebrew and Cousine.)The text was updated successfully, but these errors were encountered: