In Arabic text, If you have only one line, things looks fine but if you have multi-lines and you enabled dynamic word warp, if you click in the middle line and press backspace button, the forward character will be deleted instead of the backward letter. This bug is very annoyed. It makes using kate for text editing in Arabic frustrating experience. Steps to reproduce: 1- make sure that you enabled dynamic word warp. 2- enter any Arabic text, that get warped, such as: السلام السلام السلام السلام السلام السلامالسلام السلام السلامالسلام السلام السلام السلام السلام السلامالسلام السلام السلام السلام السلام السلامالسلام السلام السلامالسلام السلام السلام السلام السلام السلام 3- choose any word and try to delete a letter.
Fahad I've just tried this on kate from git master and deleting letters from words in the text you provided works as I would expect. Can you please confirm if this issue is still present for you.
(In reply to Justin Zobel from comment #1) > Fahad I've just tried this on kate from git master and deleting letters from > words in the text you provided works as I would expect. > > Can you please confirm if this issue is still present for you. NO the bug still there. I check it.
Created attachment 132956 [details] the problem this screen recording about the problem. notice that put the cursor after "لا" then I hit backspace the letter "م" deleted!
Thanks for the update; changing status.
This bug happens because of how text is wrapped dynamically and it is easier to understand it if you turn on "Show spaces". Consider the following sentence: This is a sentence. Assume this sentence reached the view width, and now I enter a space character. The line will not wrap, and the space will be added to the end of the sentence, outside the border. | This is a sentence.| [space][space] | This is all good, now lets see what happens when the text is RTL: X .Some RTL Text Assume "X" is the position of the cursor, and now I enter a space. The space is added to the sentence correctly, and the sentence is not wrapped as expected. However, Instead of increasing the cursor position on the left border, it is done on the right border like LTR text. The result is something like this (assume two spaces added): | X [space][space].Some RTL Te| xt | The above is what "actually" happens. If "Show spaces" is turned on, it can be seen directly. The text is painted according to the expectation, however the cursor is pointing to the wrong position. In the above case, if I try to delete a character, the character that will get deleted will be the one that is two positions forward(because of two spaces). I have tried to figure out where exactly this is handled but i have been unsuccessful so far. This can be a bug in Qt even, but I am not sure about it completely. Can any Kate Dev drop some hints?
*** Bug 367722 has been marked as a duplicate of this bug. ***
Related bug: https://bugs.kde.org/show_bug.cgi?id=368182 Related Qt bugs: https://bugreports.qt.io/browse/QTBUG-71489 https://bugreports.qt.io/browse/QTBUG-55929 https://bugreports.qt.io/browse/QTBUG-65508 Related task: https://phabricator.kde.org/T10863
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/ktexteditor/-/merge_requests/342
Git commit dc7d5b99a7691327d0da97e17906c9bba4e35371 by Waqar Ahmed. Committed on 22/03/2022 at 15:11. Pushed by cullmann into branch 'master'. Fix cursor in RTL text with dyn wrap on Also fix the issue that the cursor is not visible in column 0. Related: bug 368182 M +11 -0 src/render/katerenderer.cpp https://invent.kde.org/frameworks/ktexteditor/commit/dc7d5b99a7691327d0da97e17906c9bba4e35371
thanks @Waqar for fixing RTL bugs in kate.