Skip to content

Fix CJK word navigation in the TUI composer - #16829

Merged
etraut-openai merged 4 commits into
mainfrom
etraut/cjk_word_nav
Apr 6, 2026
Merged

etraut-openai merged 4 commits into
mainfrom
etraut/cjk_word_nav

Conversation

@etraut-openai

@etraut-openai etraut-openai commented Apr 5, 2026 •

Copy link
Copy Markdown
Contributor

Addresses #16584

Problem: TUI word-wise cursor movement treated entire CJK runs as a single word, so Option/Alt+Left and Right skipped too far when editing East Asian text.

Solution: Use Unicode word-boundary segments within each non-whitespace run so CJK text advances one segment at a time while preserving separator and delete-word behavior, and add regression coverage for CJK and mixed-script navigation.

Testing: Manually tested solution by pasting text that includes CJK characters into the composer and confirmed that keyboard navigation worked correctly (after confirming it didn't prior to the change).

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b713729660

ℹ️ 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 "@codex address that feedback".

@fcoury-oai fcoury-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.

Replicated the issues navigating between ideograms in 你好世界 你好 世界 and deleting previous word.

Confirmed the fix in this branch.

Looks good, approved.

@etraut-openai
etraut-openai merged commit 82b061a into main Apr 6, 2026
29 of 30 checks passed
@etraut-openai
etraut-openai deleted the etraut/cjk_word_nav branch April 6, 2026 15:37
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 6, 2026
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.

2 participants