Bug 513600

Summary: IME composition cursor jumps to start of uncommitted text on Windows
Product: [Applications] kate Reporter: loopslide
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: REPORTED ---    
Severity: normal    
Priority: NOR    
Version First Reported In: Git   
Target Milestone: ---   
Platform: Other   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description loopslide 2025-12-20 08:01:52 UTC
When typing Japanese text using IME on Windows, the cursor incorrectly jumps to the beginning of the uncommitted (preedit) text string whenever a new character is entered. This makes Japanese input nearly unusable.
Steps to Reproduce:

- Open Kate on Windows 10
- Switch to Japanese IME (Google Japanese Input or MS-IME)
- Start typing in hiragana (uncommitted text appears)
- Type the next character
- Observe cursor position

Expected Result:
The cursor should remain at the end of the uncommitted text string, allowing continuous input.
Actual Result:
The cursor jumps to the beginning of the uncommitted text string with each new character input.
Environment:

- OS: Windows 10
- Kate version: 26.03.70 (nightly build)
- Qt version: 6.9.2
- IME tested: Google Japanese Input, MS-IME (both show the same issue)

Additional Information:

- This issue does NOT occur on Ubuntu 22.04/24.04 with Fcitx + Mozc
- This appears to be a Windows-specific IME handling bug
- The issue occurs with both Google Japanese Input and MS-IME, suggesting it's not IME-specific but rather a Kate/KTextEditor Windows IME integration issue
- Kate seems to treat uncommitted text as if it doesn't exist until committed, causing the cursor position mismatch

Impact:
This bug makes Kate unusable for Japanese text input on Windows, forcing users to use alternative editors.