SUMMARY: When editing a file that contains BiDi text, Kate implements paragraph direction detection on a per-line basis, i.e. when the file has some lines that start with a strong LTR chracter and some that start with a string RTL character, then different lines use different paragraph directions (start rendering from the right or left side of the window). This makes editing the text very confusing, especially when both LTR and RTL lines are being wrapped from different directions. Ideally, IMHO there should not be paragraph direction in a line-based text editor (as opposed to a word-processor, see for example bug #144495), but if Kate wants to support editing in RTL mode - which will be useful for editing texts that are written completely in an RTL language - then a button to enable document wide RTL mode would be useful, similar to how a spreadsheet application handles RTL spreadsheets, by enforcing the RTL context on the entire sheet. STEPS TO REPRODUCE 1. Create a text file with where the first strong directionality character is sometimes LTR and sometimes RTL, for example, a CSV where the first column is a number and the second column is a list of names in their original spelling, some English and some, lets say, Persian. 2. Open the file in Kate OBSERVED RESULT Some of the lines a left aligned and some are right aligned. EXPECTED RESULT All the lines should be aligned the same way. SOFTWARE/OS VERSIONS Linux/KDE Plasma: KDE Plasma Version: 5.26.80 KDE Frameworks Version: 5.100.0 Qt Version: 5.15.7 ADDITIONAL INFORMATION See screenshots of example mixed alignment files.
Created attachment 153402 [details] Some text where each line starts in LTR or RTL
Created attachment 153403 [details] Example of opening a CSV with mixed directionality chars This file is essentially a table, it makes no sense that the columns are all out of whack. Using tabs instead of commas should make it easier to see the table, but it doesn't work if some lines are aligned differently.
*** This bug has been marked as a duplicate of bug 433926 ***