[PR #13031] [MERGED] Fix a crash when entering lots of text in the Japanese IME #29337

Closed
opened 2026-01-31 09:34:19 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/13031
Author: @zadjii-msft
Created: 5/3/2022
Status: Merged
Merged: 5/3/2022
Merged by: @undefined

Base: mainHead: dev/migrie/b/12730-jpn-ime-crash


📝 Commits (1)

📊 Changes

1 file changed (+7 additions, -2 deletions)

View changed files

📝 src/host/conimeinfo.cpp (+7 -2)

📄 Description

As noted in the issue. There's a case where backing up the lineEnd can result in the lineEnd pointing at exactly the lineBegin, which results in an empty view, which causes all sorts of pain later.

Instead, just return early in this case.

  • tested with an 80x24 conhost
  • tested with an 79x24 conhost

I also tried making this a FAILFAST or a THROW_HR, but the failfast immediately died (of course it did), and the throw would result in a few frames where the composition was just... entirely not displayed? Probably not what we wanted.


🔄 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/13031 **Author:** [@zadjii-msft](https://github.com/zadjii-msft) **Created:** 5/3/2022 **Status:** ✅ Merged **Merged:** 5/3/2022 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `dev/migrie/b/12730-jpn-ime-crash` --- ### 📝 Commits (1) - [`882266f`](https://github.com/microsoft/terminal/commit/882266fa31332d8bbadd26e67306aa4fe76fd377) this fixes 12730 ### 📊 Changes **1 file changed** (+7 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/host/conimeinfo.cpp` (+7 -2) </details> ### 📄 Description As noted in the issue. There's a case where backing up the `lineEnd` can result in the `lineEnd` pointing at exactly the `lineBegin`, which results in an empty view, which causes all sorts of pain later. Instead, just return early in this case. * tested with an 80x24 conhost * tested with an 79x24 conhost I also tried making this a FAILFAST or a THROW_HR, but the failfast immediately died (of course it did), and the throw would result in a few frames where the composition was just... entirely not displayed? Probably not what we wanted. * [x] Closes #12730 --- <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:34:19 +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#29337