Bug 381163

Summary: katepart shows stripes in selected text when source code highlighting is enabled and thus text is colored
Product: [Applications] kate Reporter: Marcus Behrendt <marcus.behrendt.86>
Component: partAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: cullmann, dhaumann, jst8192, marcus.behrendt.86, nortexoid
Priority: NOR    
Version: 17.04.3   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: comparision of disabled highlighting and enabled highlighting

Description Marcus Behrendt 2017-06-13 17:25:05 UTC
Created attachment 106083 [details]
comparision of disabled highlighting and enabled highlighting

This happens in all applications that use katepart4 and katepart5 (kate, kwrite, kdevelop, kile, ...). When I open kate source code highlighting is initially switched off. Now when I type some text (may be a Java class) and then select this text, no stripes are visible in the selection. But when I switch to some highlighting (in this case Java, but doesn't matter) and after that select the text again, one can see vertical white stripes in the selection. The stripes occur randomly before and after words. Now, even if I switch off highlighting, the stripes aren't going to disappear. I have to restart the application to get rid off them. 
Besides Arch I could reproduce it in KDE Neon. I tried with modesetting driver and intel xorg driver (SNA, UXA, DRI2, DRI3) but the problem persists. On reddit one user could also reproduce it on a RadeonSI system (https://www.reddit.com/r/kde/comments/6gm2wo/kate_shows_ugly_stripes_in_selection_when_text_is/diuaes8/).
Comment 1 Michael D 2017-06-13 21:10:04 UTC
I can confirm this using kate part 5.34.0 (kwrite 17.04.2) on KDE Neon User Edition (both Intel and Radeon hardware). It does not always happen and I can't see any pattern except that it always occurs before or after a space.
Comment 2 Marcus Behrendt 2017-08-12 20:15:39 UTC
Any thoughts on this?
Comment 3 jst8192 2018-03-04 17:32:30 UTC
Changing font hinting style to medium or full fixes the issue for me.
Comment 4 Christoph Cullmann 2018-03-06 08:40:59 UTC
Will be fixed in Qt 5.12:

https://bugreports.qt.io/browse/QTBUG-66036
Comment 5 Dominik Haumann 2018-03-06 08:43:10 UTC
See https://kate-editor.org/2018/02/10/__trashed/ for details.