Skip to content

bug(cli): 输入框换行时背景色渲染不连续 #5562

Description

@yiliang114

What happened? / 问题描述

在 Qwen Code 交互式 TUI 中,输入框内的文本发生换行时,输入框背景色显示不连续。

复现方式:

  1. 启动 Qwen Code 交互式界面。
  2. 在底部输入框输入一段较长文本,使其自动换行,或输入多行内容。
  3. 观察输入框内容区域的背景色。

实际表现是:换行后输入框背景没有完整覆盖输入区域,部分区域仍显示为终端背景色,视觉上出现断裂。截图中红色箭头指向的问题区域。

输入框换行时背景色渲染不连续

What did you expect to happen? / 期望行为

输入框应该有连续、完整的背景色覆盖。无论输入内容是一行、多行,还是因为宽度不足发生软换行,整个输入框内容区域都应保持一致的背景色,不应只覆盖文字所在片段或在换行处出现空洞。

Client information / 客户端信息

Client Information

Warning: MCP server(s) failed to start: everything. Continuing with built-in tools and any servers that did connect. Re-run with QWEN_CODE_DEBUG=1 to see per-server reasons.
Qwen Code v0.18.4
Model: qwen3.7-max
Fast Model: not set
Auth: openai
Platform: darwin x64 (24.6.0)
Node.js: v22.20.0
Session: b0fb73ce-9135-44f5-9416-548f38f0931b
Git commit: c898e9f
LSP: disabled

Anything else we need to know? / 补充信息

本地简单看了一下,输入框由 InputPrompt 通过 BaseTextInput 渲染;当前内容区按 visual line 渲染,但没有给完整输入区域/每一行容器设置背景色。这可能导致换行后只有文本片段或部分行显示背景,而空白区域没有被背景覆盖。

Metadata

Metadata

Assignees

No one assigned

    Labels

    category/uiUser interface and displaypriority/P3Low - Minor, cosmetic, nice-to-fix issuesscope/componentsUI components and widgetsscope/interactiveInteractive CLI featuresscope/renderingDisplay and rendering logictype/bugSomething isn't working as expected

    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