[PR #5135] [MERGED] Redraw TSFInputControl when Terminal cursor updates #26125

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/5135
Author: @leonMSFT
Created: 3/26/2020
Status: Merged
Merged: 3/31/2020
Merged by: @undefined

Base: masterHead: dev/lelian/imeisme


📝 Commits (10+)

  • 28d4aac consolidate redraw into its own function
  • 8012a9b so it works but im not convinced i wont crash everything
  • 7ff587e explicitly revoke some handlers bc it would crash
  • 7b812d4 ok now it works for real
  • c81cd1c merge from master
  • 2a9e6a0 comment update
  • 0139ba5 formatting
  • 76d0c24 changing currentTerminalCursorPos to tilPoint
  • 7fcf7c9 merge from master, use til point where possible and convenient
  • c33f483 formatting grrrrrrrr

📊 Changes

7 files changed (+152 additions, -38 deletions)

View changed files

📝 src/cascadia/TerminalControl/TSFInputControl.cpp (+92 -36)
📝 src/cascadia/TerminalControl/TSFInputControl.h (+9 -0)
📝 src/cascadia/TerminalControl/TSFInputControl.idl (+1 -0)
📝 src/cascadia/TerminalControl/TermControl.cpp (+30 -2)
📝 src/cascadia/TerminalControl/TermControl.h (+1 -0)
📝 src/cascadia/TerminalCore/Terminal.cpp (+15 -0)
📝 src/cascadia/TerminalCore/Terminal.hpp (+4 -0)

📄 Description

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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/5135 **Author:** [@leonMSFT](https://github.com/leonMSFT) **Created:** 3/26/2020 **Status:** ✅ Merged **Merged:** 3/31/2020 **Merged by:** [@undefined](undefined) **Base:** `master` ← **Head:** `dev/lelian/imeisme` --- ### 📝 Commits (10+) - [`28d4aac`](https://github.com/microsoft/terminal/commit/28d4aac4dfac0d86d65e15bfeb8274a4a376b675) consolidate redraw into its own function - [`8012a9b`](https://github.com/microsoft/terminal/commit/8012a9bec9995db3991bf30ef5396dae66f92538) so it works but im not convinced i wont crash everything - [`7ff587e`](https://github.com/microsoft/terminal/commit/7ff587e7e57597bc88726058bb8043cb4c94e619) explicitly revoke some handlers bc it would crash - [`7b812d4`](https://github.com/microsoft/terminal/commit/7b812d432fcd334121fda40d3805cd4c51e6d724) ok now it works for real - [`c81cd1c`](https://github.com/microsoft/terminal/commit/c81cd1cd8ec8e1f6238bb4daff8c986b3fc94566) merge from master - [`2a9e6a0`](https://github.com/microsoft/terminal/commit/2a9e6a0c661d21b92f445bf097b405265ef726a2) comment update - [`0139ba5`](https://github.com/microsoft/terminal/commit/0139ba54f1361001ea0771b5b26e08acb76a870f) formatting - [`76d0c24`](https://github.com/microsoft/terminal/commit/76d0c2482a9c4916f058a1fea133b5b51ced2e85) changing currentTerminalCursorPos to tilPoint - [`7fcf7c9`](https://github.com/microsoft/terminal/commit/7fcf7c9f4600f674f41e4c9b8476d3fc4a447255) merge from master, use til point where possible and convenient - [`c33f483`](https://github.com/microsoft/terminal/commit/c33f483c216e8c89f37391e8b6059d382b5c84b9) formatting grrrrrrrr ### 📊 Changes **7 files changed** (+152 additions, -38 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalControl/TSFInputControl.cpp` (+92 -36) 📝 `src/cascadia/TerminalControl/TSFInputControl.h` (+9 -0) 📝 `src/cascadia/TerminalControl/TSFInputControl.idl` (+1 -0) 📝 `src/cascadia/TerminalControl/TermControl.cpp` (+30 -2) 📝 `src/cascadia/TerminalControl/TermControl.h` (+1 -0) 📝 `src/cascadia/TerminalCore/Terminal.cpp` (+15 -0) 📝 `src/cascadia/TerminalCore/Terminal.hpp` (+4 -0) </details> ### 📄 Description <!-- 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:14:07 +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#26125