Bug 367909 - Pressing Backspace skips Arabic and Hebrew diacritics
Summary: Pressing Backspace skips Arabic and Hebrew diacritics
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: part (show other bugs)
Version: 16.04
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-28 04:42 UTC by Safa Alfulaij
Modified: 2017-12-23 20:03 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Safa Alfulaij 2016-08-28 04:42:34 UTC
When you have a text that ends with a diacritic (https://en.wikipedia.org/wiki/Arabic_diacritics, https://en.wikipedia.org/wiki/Hebrew_diacritics), pressing backspace will ignore it and remove the whole character (what is called cluster).
In normal text edits (QLineEdit, QTextEdit), each diacritic is removed first, and when there is non left, another backspace press will delete the character.

The reason of this is using "previousCursorPosition" method, as cursor doesn't move when adding diacritics. And so, the previous position will be the last character.

Sample text (With diacritic at the end): "ذهبَ"
Sample text (With two diacritics at the end): "حيٌّ"

Reproducible: Always

Steps to Reproduce:
1. Write/Copy-Paste sample text
2. Press backspace

Actual Results:  
The character with it's diacritics are all removed

Expected Results:  
َ    diacritic is removed in the first sample text, and
ٌ    diacritic is removed in the second sample text
Comment 1 Dominik Haumann 2016-08-28 10:25:31 UTC
Is this maybe a regrssion caused by https://git.reviewboard.kde.org/r/127843/ ?
Comment 2 Safa Alfulaij 2016-08-28 10:41:03 UTC
(In reply to Dominik Haumann from comment #1)
> Is this maybe a regrssion caused by
> https://git.reviewboard.kde.org/r/127843/ ?

Looks like that!
But, Qt normal widgets doesn't remove the Indic composed characters as whole! The characters are removed "base" by "base". This is the way used in Chromium, LibreOffice and Gtk.
Comment 3 Safa Alfulaij 2017-02-14 06:15:36 UTC
Ping.
I'd say an option in the settings can be done so that the user is able to choose the behaviour he need.
This is really annoying, all other apps works correctly.