Bug 367722

Summary: Caret shows in wrong location (one letter off) in Right-to-Left paragraphs when using dynamic word wrap
Product: [Applications] kate Reporter: Muhammad <msaied93>
Component: partAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: cullmann, justin.zobel, safa1996alfulaij, tareef, waqar.17a, zahir.i1994
Priority: NOR    
Version: 16.04   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description Muhammad 2016-08-23 14:18:14 UTC
Caret appears in wrong location when using dynamic word wrap with Arabic text. The bug only appears in paragraphs that start with RTL text and thus have a Right-to-Left direction.


Reproducible: Always

Steps to Reproduce:
1. create a new document.
2. enable dynamic word wrap.
3. type/paste some text has has RTL direction (it needs to be long enough to wrap, or you can make the editor window smaller to force text to wrap).

Actual Results:  
You will see that the caret position is actually one letter off its correct position, selecting a single letter or a few words will show it clearly.

Expected Results:  
Caret should appear in its exact position.

The problem does not appear on the last line of a paragraph.
Paragraphs that start with English letters (paragraphs with Left-to-Right direction) do not have that problem even if they contain Arabic words or other UTF characters.

Kate version: 16.04.3 (also in KWrite 16.04.3)
OS: Manjaro 16.06.1 (x86_64)
Comment 1 Tareef Mando 2016-08-27 18:34:23 UTC
I have the same problems (Fedora 24, Kate 16.04.3, Kwrite 16.04.3): Caret appears in wrong location when using dynamic word wrap with Arabic text
Comment 2 Safa Alfulaij 2016-08-28 07:45:12 UTC
Duplicated: https://bugs.kde.org/show_bug.cgi?id=364707
But this has better explanation.

OS: Kate 16.04, KF 5.25.0, ArchLinux

Screenshots: http://imgur.com/a/RwpNu (First and last are right)
Text used:

خشب
خشب خشب خشب خشب خشب خشب خشب خشب خشب خشب خشب خشب خشب خشب خشب خشب خشب خشب خشب خشب خشب خشب خشب خشب خشب خشب خشب
Comment 3 Safa Alfulaij 2016-08-31 20:10:49 UTC
*** Bug 364707 has been marked as a duplicate of this bug. ***
Comment 4 Safa Alfulaij 2016-09-10 18:00:05 UTC
*** Bug 368218 has been marked as a duplicate of this bug. ***
Comment 5 Justin Zobel 2020-11-02 02:27:31 UTC
Can one of those affected please re-test on a recent version of kate and confirm if this is still an issue, thanks.
Comment 6 zahir.i1994 2020-11-02 03:29:20 UTC
(In reply to Justin Zobel from comment #5)
> Can one of those affected please re-test on a recent version of kate and
> confirm if this is still an issue, thanks.

Unfortunately, the bug still persists in the latest release and nightly version of Kate on Windows.
Comment 7 Justin Zobel 2020-11-02 03:36:02 UTC
Confirmed.
Comment 8 Waqar Ahmed 2020-12-14 17:37:17 UTC
This and https://bugs.kde.org/show_bug.cgi?id=385694 are dupes
Comment 9 Christoph Cullmann 2020-12-14 17:46:41 UTC

*** This bug has been marked as a duplicate of bug 385694 ***