Skip to content

Fix crash when backspacing placeholders adjacent to multibyte text - #2674

Merged
aibrahim-oai merged 18 commits into
openai:mainfrom
mattsu2020:main
Aug 27, 2025
Merged

aibrahim-oai merged 18 commits into
openai:mainfrom
mattsu2020:main

Conversation

@mattsu2020

@mattsu2020 mattsu2020 commented Aug 25, 2025 •

Copy link
Copy Markdown
Contributor

Prevented panics when deleting placeholders near multibyte characters by clamping the cursor to a valid boundary and using get-based slicing

Added a regression test to ensure backspacing after multibyte text leaves placeholders intact without crashing

@github-actions

github-actions Bot commented Aug 25, 2025 •

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@mattsu2020

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

github-actions Bot added a commit that referenced this pull request Aug 25, 2025
…E確定の日本語入力がバッファ滞留で最後の1文字が表示されない問題を解消\n- codex-tui のテスト一式で回帰なしを確認
@bolinfest

Copy link
Copy Markdown
Collaborator

@aibrahim-oai this looks related to #2544

let has_ctrl_or_alt =
modifiers.contains(KeyModifiers::CONTROL) || modifiers.contains(KeyModifiers::ALT);
if !has_ctrl_or_alt {
// 日本語などの非ASCII文字はIME確定で高速に連続送信されやすく、

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you replace these comments in Japanese with English ones?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed it.

change japanse to english

@mattsu2020 mattsu2020 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed the comment to English.

let has_ctrl_or_alt =
modifiers.contains(KeyModifiers::CONTROL) || modifiers.contains(KeyModifiers::ALT);
if !has_ctrl_or_alt {
// 日本語などの非ASCII文字はIME確定で高速に連続送信されやすく、

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed it.

@aibrahim-oai
aibrahim-oai enabled auto-merge (squash) August 27, 2025 01:29
@aibrahim-oai
aibrahim-oai merged commit bd65c4d into openai:main Aug 27, 2025
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 27, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants