[PR #13677] [MERGED] Clean up TSFInputControl a bit #29707

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/13677
Author: @lhecker
Created: 8/4/2022
Status: ✅ Merged
Merged: 8/8/2022
Merged by: @DHowett

Base: main ← Head: dev/lhecker/tsf-cleanup


📝 Commits (1)

  • 87a660e Partial cleanup of TSFInputControl

📊 Changes

2 files changed (+47 additions, -80 deletions)

View changed files

📝 src/cascadia/TerminalControl/TSFInputControl.cpp (+32 -65)
📝 src/cascadia/TerminalControl/TSFInputControl.h (+15 -15)

📄 Description

While working on #13398 I felt that TSFInputControl wasn't up to sniff.
This commit is a minor cleanup of the class:

  • default member initializers
  • Simplified use of STL classes which already perform boundary checks
  • Correctly check text buffer emptiness in _SendAndClearText
  • Track selection range as mandated by the API

Validation Steps Performed

  • Japanese IME (Full-Width Katakana)
    Typing "saitama" produces "サイタマ" ✅
  • Korean IME
    Typing "gksrmf" produces "한글" ✅
  • Vietnamese IME
    Typing "xin chaof" continues to produce broken "xin xinchaof"
    (It's supposed to produce "xin chào")
  • Emoji Picker (Win+.)
    ✅

🔄 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/13677 **Author:** [@lhecker](https://github.com/lhecker) **Created:** 8/4/2022 **Status:** ✅ Merged **Merged:** 8/8/2022 **Merged by:** [@DHowett](https://github.com/DHowett) **Base:** `main` ← **Head:** `dev/lhecker/tsf-cleanup` --- ### 📝 Commits (1) - [`87a660e`](https://github.com/microsoft/terminal/commit/87a660ea98e90cca4d7465bcf8c98a2fc6b0233b) Partial cleanup of TSFInputControl ### 📊 Changes **2 files changed** (+47 additions, -80 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalControl/TSFInputControl.cpp` (+32 -65) 📝 `src/cascadia/TerminalControl/TSFInputControl.h` (+15 -15) </details> ### 📄 Description While working on #13398 I felt that `TSFInputControl` wasn't up to sniff. This commit is a minor cleanup of the class: * default member initializers * Simplified use of STL classes which already perform boundary checks * Correctly check text buffer emptiness in `_SendAndClearText` * Track selection range as mandated by the API ## Validation Steps Performed * Japanese IME (Full-Width Katakana) Typing "saitama" produces "サイタマ" ✅ * Korean IME Typing "gksrmf" produces "한글" ✅ * Vietnamese IME Typing "xin chaof" continues to produce broken "xin xinchaof" (It's supposed to produce "xin chào") * Emoji Picker (Win+.) ✅ --- <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:36:26 +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#29707