Bug 511820

Summary: Arabic text vanishes (turns invisible) when selected
Product: [Applications] kate Reporter: BOF <bugs_kde_org.5.kuru>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: waqar.17a
Priority: NOR    
Version First Reported In: 25.08.3   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Kate - selected text vanished
Kate - arabic text vanishes when selected

Description BOF 2025-11-08 12:40:48 UTC
Created attachment 186613 [details]
Kate - selected text vanished

SUMMARY
When you copy arabic text and select it (eg. dragging your mouse, Ctrl + A, Shift + arrow keys) the text turns invisible

STEPS TO REPRODUCE
1. Copy arabic text
2. Insert it into Kate (or KWrite)
3. Select the text with eg. Ctrl + A

OBSERVED RESULT
Text turns invisible

EXPECTED RESULT
Text does not turn invisible

SOFTWARE/OS VERSIONS
Kate
Version 25.08.2

Operating System
KDE neon User Edition
KDE Plasma Version: 6.5.1
KDE Frameworks Version: 6.19.0
Qt Version: 6.9.2
Kernel Version: 6.14.0-34-generic (64-bit)
Graphics Platform: Wayland
Comment 1 BOF 2025-11-08 12:43:49 UTC
Created attachment 186614 [details]
Kate - arabic text vanishes when selected

A demonstration of the bug.

Steps:
1) For this purpose the Wikipedia links of "Wikipedia" were copied from Wikidata (https://www.wikidata.org/wiki/Q52) as it has many different languages.
2) The copied text was pasted into Kate (but KWrite will also do)
3) The text was selected with Ctrl + A and by using the cursor on screen
Comment 2 Waqar Ahmed 2025-11-14 11:01:53 UTC
This happens with BIDI text. Our selection painter assumes text is uni directional thus it fails here. Not simple/easy to fix.