Skip to content

fix: diff_buffers clear-to-end when deleting wide graphemes#4921

Merged
joshka-oai merged 2 commits into
openai:mainfrom
MomentDerek:main
Oct 18, 2025
Merged

fix: diff_buffers clear-to-end when deleting wide graphemes#4921
joshka-oai merged 2 commits into
openai:mainfrom
MomentDerek:main

Conversation

@MomentDerek

Copy link
Copy Markdown
Contributor

fix #4870 #4717

  • Fix the chat composer “phantom space” bug that appeared when backspacing CJK (and other double-width) characters after the composer got a uniform background in 43b63cc….
  • Pull diff_buffers’s clear-to-end logic forward to iterate by display width, so wide graphemes are counted correctly when computing the trailing column.
  • Keep modifier-aware detection so styled cells are still flushed, and add a regression test (diff_buffers_clear_to_end_starts_after_wide_char) that covers the CJK deletion scenario.

@github-actions

github-actions Bot commented Oct 8, 2025

Copy link
Copy Markdown
Contributor

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

@MomentDerek

Copy link
Copy Markdown
Contributor Author

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

@joshka-oai

Copy link
Copy Markdown
Contributor

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. 👍

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

Comment thread codex-rs/tui/src/custom_terminal.rs Outdated
@MomentDerek

Copy link
Copy Markdown
Contributor Author

@joshka-oai Due to no remaining space in GitHub Action, one of the CI services has stopped running, can you help me restart it?

@joshka-oai

Copy link
Copy Markdown
Contributor

Force pushed a rebase on main and a few small tweaks to make it easier to read / understand this code going forward.

Tested that this fixes the problems rendering Chinese (#4717), Korean (#4898, #4870), and Japanese (#3260) characters correctly.

@joshka-oai joshka-oai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM - thanks for the PR

@joshka-oai joshka-oai merged commit 98c6dfa into openai:main Oct 18, 2025
20 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 18, 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.

Windows: Korean IME preedit shows blanks or disappears only in Codex CLI

2 participants