[PR #4140] Fix IME/CoreTextEditContext not being reset properly #25655

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

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

State: closed
Merged: Yes


The first argument to NotifyTextChanged incorrectly was [0,0]
instead of the length of the text to be removed from the
CoreTextEditContext.

Best source of documentation for NotifyTextChanged:
https://docs.microsoft.com/en-us/windows/uwp/design/input/custom-text-input#overriding-text-updates

FYI @DHowett-MSFT (just in case): C++/WinRT uses winrt::param::hstring
for string parameters which intelligently borrows strings. As such you
can simply pass a std::wstring to most WinRT methods without the need
of having to allocate an intermediate hstring. 🙂

Validation Steps Performed

I followed the reproduction instructions of #3706 and #3745 and ensured
the issue doesn't happen anymore.

Closes #3645
Closes #3706
Closes #3745

**Original Pull Request:** https://github.com/microsoft/terminal/pull/4140 **State:** closed **Merged:** Yes --- The first argument to `NotifyTextChanged` incorrectly was `[0,0]` instead of the length of the text to be removed from the `CoreTextEditContext`. Best source of documentation for `NotifyTextChanged`: https://docs.microsoft.com/en-us/windows/uwp/design/input/custom-text-input#overriding-text-updates FYI @DHowett-MSFT (just in case): C++/WinRT uses `winrt::param::hstring` for string parameters which intelligently borrows strings. As such you can simply pass a `std::wstring` to most WinRT methods without the need of having to allocate an intermediate `hstring`. 🙂 ## Validation Steps Performed I followed the reproduction instructions of #3706 and #3745 and ensured the issue doesn't happen anymore. Closes #3645 Closes #3706 Closes #3745
claunia added the pull-request label 2026-01-31 09:10:54 +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#25655