MoonshotAI / MoonshotAI/kimi-code

[TUI] CJK ambiguous-width characters (① ② ③) overlap the following text on Windows Terminal

Open
#3,301 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
7.5k
Forks
1.2k
Avg merge
11h 53m
Merged PRs (30d)
350

Description

Environment

  • kimi-code 0.38.0 native Windows CLI
  • Windows Terminal on Windows 11 (zh-CN locale; East Asian ambiguous-width chars render as 2 cells)

Repro

  1. Have the assistant output text containing circled digits, e.g. ①你的 GitHub 真身是 wubing-wx;②鼠标点击定位那条
  2. In the TUI, each circled digit overlaps the character that follows it (screenshot available on request).

Analysis

U+2460 CIRCLED DIGIT ONE (and siblings) is East Asian Ambiguous width: Windows Terminal in a CJK locale renders it 2 cells wide, while the TUI's width model appears to count it as 1 cell — every subsequent glyph on the line is drawn one cell too far left, producing the overlap. Suggest honoring the terminal's ambiguous-width behavior (or defaulting ambiguous=2 in CJK locales).

Workaround

Avoid ambiguous-width characters in assistant output (use 1. instead of ).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in the TUI's character-width and rendering path, using the Windows Terminal reproduction with U+2460 circled digits in a zh-CN locale. Determine how ambiguous-width characters are measured and make the rendered text stop overlapping the following glyph while preserving normal-width behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.