anthropics / anthropics/claude-code

Terminal rendering left-margin indentation is included when copying assistant text

未关闭
#94,283 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
area:tui bug
主要语言
Python
星标
145k
派生
23.1k
PR 合并指标
PR 指标待抓取

描述

## What happened
When copying a plain-text response from the terminal (e.g. to paste into an external web form), the pasted text has leading whitespace/indentation on each line. This indentation appears to be part of how the terminal UI renders assistant messages (a left margin distinguishing them from other content), not part of the actual text content returned by the model.

Tried multiple workarounds from the model side (removing markdown formatting, collapsing to a single paragraph, collapsing to a single line) — none change the outcome, since the issue is in the rendering/selection layer, not the text content itself.

## Repro steps
1. In an interactive terminal session, ask Claude Code for a plain-text paragraph intended for copy-paste elsewhere.
2. Select and copy the response text directly from the terminal (e.g. via mouse drag-select).
3. Paste into a plain-text field (e.g. a web form, a text editor).

## Expected
Pasted text has no leading whitespace — it matches the actual text content of the response.

## Actual
Pasted text has leading whitespace on each line, requiring manual cleanup before it can be used elsewhere.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。