github / github/copilot-cli

CJK characters visually overlapped/dropped in input box on Windows (buffer is correct, display bug only)

オープン
#3,536 コメント 1 件 リアクション 2 件 担当者 0 名 GitHub で見る
area:platform-windows area:terminal-rendering
主要言語
Shell
スター
11.2k
フォーク
1.9k
平均マージ
14時間 16分
マージ済み PR(30日)
6

説明

### Describe the bug

In the Windows Terminal, when a prompt containing mixed Chinese (CJK) and English characters is submitted, the **submitted prompt header / bubble drops or visually overlaps CJK characters**, even though the same text renders correctly in the input box.

Concretely, I typed:

```
Copilot CLI如何提issue
```

- The **input field** (bottom prompt area) displayed the text correctly: `Copilot CLI如何提issue` / `Copilot CLI怎么提issue`.
Image

- The **submitted-prompt header bubble** displayed it as: `Copilot CLI 何 提issue` — the characters `如何` collapsed to just `何` plus stray whitespace, and the right border of the box clipped/overlapped the glyphs.

Note: after enter, the message is correctly passed to the CLI. But display message during type is incorrect.

This looks like a CJK East-Asian-Width miscalculation: each CJK character is rendered by the terminal as 2 columns wide, but the renderer for the header bubble appears to allocate only 1 column, so adjacent glyphs are overwritten/clipped by the next character or the box border.

This may share a root cause with #2825 (CJK text wrapping error), but the visible symptom is different — there it's wrapping in the input; here it's characters being silently dropped/overlapped in the displayed (already-submitted) prompt.

### Affected version

GitHub Copilot CLI `1.0.55-3` on Windows (Windows Terminal, PowerShell 7).

### Steps to reproduce the behavior

1. Launch `copilot` in Windows Terminal.
2. Enable autopilot mode (`Shift+Tab` until "Autopilot mode enabled with all permissions.").
3. Type a prompt containing mixed CJK + ASCII, e.g. `Copilot CLI如何提issue`.
4. Press Enter to submit.
5. Observe the rendered prompt bubble/header at the top of the response.

### Expected behavior

The submitted-prompt header should render the prompt exactly as typed, with CJK characters preserved and no overlap/clipping. CJK characters should be treated as 2 terminal columns wide for layout purposes.

### Actual behavior

CJK characters in the submitted prompt header are dropped/overlapped (e.g. `如何` → `何 `). The input area itself renders correctly, so the bug appears to be specific to the prompt-bubble renderer's width calculation.

### Additional context

- OS: Windows 11
- Terminal: Windows Terminal
- Shell: PowerShell 7
- Font: default Windows Terminal font (Cascadia Mono)
- Locale: zh-CN / en-US mixed
- Related: #2825 (CJK text wrapping), #3045 (IME flicker), #3097 (paste corruption)

Screenshots (will attach via web UI):
- Image 1: submitted-prompt header showing dropped/overlapped CJK characters.
- Image 2: input-field showing the same prompt rendering correctly.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。