[PR #5135] Redraw TSFInputControl when Terminal cursor updates #26130

Open
opened 2026-01-31 09:14:09 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/5135

State: closed
Merged: Yes


Summary of the Pull Request

This PR will allow TSFInputControl to redraw its Canvas and TextBlock in response to when the Terminal cursor position updates. This will fix the issue where during Korean composition, the first symbol of the next composition will appear on top of the previous composed character. Since the Terminal Cursor updates a lot, I've added some checks to see if the TSFInputControl really needs to redraw. This will also decrease the number of actual redraws since we receive a bunch of LayoutRequested events when there's no difference between them.

PR Checklist

Validation Steps Performed

Startup, teardown, CJK IME gibberish testing, making sure the IME block shows up in the right place.

**Original Pull Request:** https://github.com/microsoft/terminal/pull/5135 **State:** closed **Merged:** Yes --- <!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request This PR will allow TSFInputControl to redraw its Canvas and TextBlock in response to when the Terminal cursor position updates. This will fix the issue where during Korean composition, the first symbol of the next composition will appear on top of the previous composed character. Since the Terminal Cursor updates a lot, I've added some checks to see if the TSFInputControl really needs to redraw. This will also decrease the number of actual redraws since we receive a bunch of `LayoutRequested` events when there's no difference between them. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [x] Closes #4963 * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [x] Tests added/passed <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed Startup, teardown, CJK IME gibberish testing, making sure the IME block shows up in the right place.
claunia added the pull-request label 2026-01-31 09:14:09 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#26130