Using capital letters to represent right-to-left text, the bidirectional text is: parsha 21 is YOU COUNT (THE HEADS OF ISRAELITES); this is COUNTING (THE HEADS OF GERSHONITES) expected rendering: parsha 21 is (SETILEARSI FO SDAEH EHT) TNUOC UOY; this is (SETINOHSREG FO SDAEH EHT) GNITNUOC actual rendering: parsha 21 is SETILEARSI FO SDAEH EHT) TNUOC UOY); this is SETINOHSREG FO SDAEH EHT) GNITNUOC) As the text between the parentheses is entirely in Hebrew, this shouldn't happen, but even with bidirectional embedding characters, it does. (I hope those characters are right. I inserted them as bytes using okteta.) Note that two lines have wrong parentheses )like this(. I was unaware that the Hebrew keyboard layout has 0x28 on shift-0 and 0x29 on shift-9. I duplicated the lines and fixed them in the other two lines. The text is a comment I inserted at parsha 35 in a translation of the Bible into Lojban. Reproducible: Always Steps to Reproduce: 1. Type some text in left-to-right alphabet, then a left parenthesis. 2. Switch to the Hebrew layout and type some text. 3. Switch back to Latin/Cyrillic/Greek/autc. and type more text. 4. Insert a Hebrew word before the parenthesis. Actual Results: Before step 4, the opening parenthesis is on the left, facing right, and the closing parenthesis is on the right, facing left. After step 4, the opening parenthesis is where the closing parenthesis was, facing left, and the closing parenthesis jumped past the inserted word, which is right of the words in parentheses, and is also facing left. Putting the cursor on one parenthesis correctly highlights both, even though they are facing the same direction. Expected Results: Before step 4, the opening parenthesis is on the right, facing left, and the closing parenthesis is on the left, facing right (indistinguishable from the actual, unless you highlight one parenthesis). After step 4, the parentheses have not moved, and the inserted word is right of the words in parentheses. Kate version is 3.13.3, not 3.13.2.
Created attachment 90164 [details] Sample text which shows the bug.
Created attachment 90165 [details] Screenshot of Kate showing the above file
Created attachment 99646 [details] Screenshot from 16.04.2 I get a different, but still messed up result. Arch Linux 64-bit Kate 16.04.2 KDE Frameworks 5.22.0 Qt 5.6.1 xcb wm
Created attachment 134324 [details] Screenshot from 20.08.1 (windows) in comparison to Firefox rendering
I think this has been fixed (not sure from which version, at the very least it is fixed in version 20.08.1) My only point of comparison is the rendering from firefox, so feel free to reopen if more examples come up that exhibit the wrong behavior.