[PR #13677] Clean up TSFInputControl a bit #29712

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

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

State: closed
Merged: Yes


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+.)
**Original Pull Request:** https://github.com/microsoft/terminal/pull/13677 **State:** closed **Merged:** Yes --- 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+.) ✅
claunia added the pull-request label 2026-01-31 09:36:27 +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#29712