Skip to content

CJK (Chinese/Japanese/Korean) IME composition text appears at wrong position — input shows on an extra line #3456

@Derick-DD

Description

@Derick-DD

What happened?

When typing Chinese in Qwen Code's terminal UI, the IME composition text (pinyin / candidate characters) appears on an extra line at the bottom of the terminal instead of at the cursor position in the input prompt. Characters only appear at the correct location after composition is confirmed. This makes CJK input experience very poor.

This is a known defect in the ink framework affecting all ink-based CLI tools:
ink#759 — CJK input lag, character drops, wrong cursor position
ink v7.0.0 (released 2026-04-08) — ships useCursor hook and declarative Cursor component
Qwen Code v0.14.5 uses ink 6.2.3 (confirmed in package-lock.json), which does not include this fix.

Image

What did you expect to happen?

The IME composition window should appear at or near the cursor position inside the > input prompt, consistent with how CJK input works in a normal shell. Pre-edit text (pinyin, partial Hangul, etc.) should be visible at the logical cursor location, not on a separate line at the terminal bottom.

Suggested Fix

Upgrade ink dependency in packages/cli/package.json from ^6.2.3 to ^7.0.1

Client information

╭──────────────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ 状态 │
│ │
│ Qwen Code 0.14.5 (a661294) │
│ 运行环境 Node.js v23.6.0 / npm 10.9.2 │
│ 操作系统 darwin arm64 (23.4.0) │
│ │
│ 认证 API Key - openai │
│ 基础 URL https://dashscope.aliyuncs.com/compatible-mode/v1
│ 模型 qwen3.5-plus │
│ 快速模型 qwen3.5-plus │
│ 会话 ID e2c376f1-016d-425a-96b0-50b6ec77343f │
│ 沙箱 no sandbox │
│ 代理 no proxy │
│ 内存使用 110.3 MB │
│ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯

Login information

No response

Anything else we need to know?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/enhancementNon-bug improvement or optimization

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions