Bug 507339

Summary: Multiple cursors breaks autocomplete in JS LSP integration
Product: [Applications] kate Reporter: Christian Lampe <kontakt>
Component: partAssignee: KWrite Developers <kwrite-bugs-null>
Status: REPORTED ---    
Severity: minor CC: kontakt
Priority: NOR    
Version First Reported In: 25.04.3   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: A brief demonstration of the bug

Description Christian Lampe 2025-07-22 03:58:24 UTC
Created attachment 183411 [details]
A brief demonstration of the bug

SUMMARY


STEPS TO REPRODUCE
1. Make sure the TypeScript/JavaScript LSP is installed and working
2. Open a JS file in Kate
3. Set multiple cursors, then try to autocomplete an object property

OBSERVED RESULT
On all non-primary cursors, the dot separating the object from its property is duplicated

EXPECTED RESULT
The autocomplete should be filled in at all cursors exactly like it happens at the main cursor.

SOFTWARE/OS VERSIONS 
Operating System: Fedora Linux 42
KDE Plasma Version: 6.4.3
KDE Frameworks Version: 6.16.0
Qt Version: 6.9.1
Kernel Version: 6.15.6-200.fc42.x86_64 (64-bit)

ADDITIONAL INFORMATION
It seems to only break on secondary cursors when the suggestion has the purple or green icon, if the suggestion's icon in the suggestion list is white it doesn't break. 
Also (I am guessing it's the same bug) when autocompleting private properties, the # character gets duplicated, but that happens _only_ on the primary cursor, all secondary cursors get that one right. Also, the dot doesn't get duplicated in that case on any cursor.
Comment 1 Christian Lampe 2025-07-22 04:13:37 UTC
Note: I am still not sure if this is actually a bug in Kaye or if it's the LSP that bugs out, because it for example doesn't happen with text-based autocompletion suggestions (with the "T+" symbol in the list) or in e.g. Python or C++.   
I posted about this first on r/kde, where u/ChristophCullman recommended I file a bug report: https://www.reddit.com/r/kde/comments/1m3pn1c/comment/n4euoum/