Fix Windows IME composition string being displayed incorrectly (#46545)
Previously, a new composition string was processed before a new
composition result. Thus, in the case that a keystroke creates a new
composition result and composition string, the processing of the new
result would overwrite the new string, even though they should both be
displayed. Processing them in the reverse order fixes this issue.
Fixes #42201
Additionally: while fixing this issue, I discovered that the Japanese
IME sometimes moves the cursor far away from the inserted text. WPF
works around this issue by only respecting the IME's requested cursor
position if it's adjacent to uncommitted text. So, we copy this
workaround.
Release Notes:
- N/A
af6385a293John Tur committed on 1/11/2026, 5:10:51 AM· committed by GitHubparentecc3928