claude-code - 💡(How to fix) Fix [Feature Request] TUI gutter and trailing padding make copy-paste tedious [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#52331Fetched 2026-04-24 06:09:59
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Author
Timeline (top)
labeled ×3commented ×1
RAW_BUFFERClick to expand / collapse

Bug Description TUI left gutter makes copy-paste tedious

Claude Code renders every line of assistant output with a 2-space left margin (the visible gutter). When I select text in the terminal, those 2 spaces are included in the copy, so every pasted line starts with . Same issue exists with trailing padding to terminal width — lines come out with trailing whitespace too.

I copy content out of Claude Code often (codding tools, code snippets, explanations to paste into PRs / Linear / Slack) and having to strip leading+trailing whitespace every time is a real friction point.

Example: this message

Tried:

  • JetBrains embedded terminal → switched to Konsole (KDE). Same behavior, so it's the renderer, not the terminal.
  • Konsole's "Trim trailing spaces on copy" helps with trailing, but there's no equivalent for leading.
  • No setting in ~/.claude/settings.json, no env var, no CLI flag found.

Request: either

  1. A setting to disable the left gutter / render flush-left (e.g. "tui": { "gutter": false } or "compactOutput": true), or
  2. A "copy-friendly" render mode that drops both the gutter and trailing line padding, or
  3. At minimum, don't pad lines to terminal width so trailing whitespace isn't in the buffer.

Env: Claude Code CLI on openSUSE Linux, Konsole (KDE) and JetBrains terminal both affected.

extent analysis

TL;DR

Consider adding a setting to disable the left gutter or implement a "copy-friendly" render mode to prevent leading and trailing whitespace from being copied.

Guidance

  • Investigate the possibility of adding a configuration option, such as "tui": { "gutter": false } or "compactOutput": true, to disable the left gutter.
  • Explore implementing a "copy-friendly" render mode that drops both the gutter and trailing line padding.
  • As a minimal fix, consider modifying the renderer to not pad lines to terminal width, preventing trailing whitespace from being included in the copy buffer.
  • Verify the behavior in different terminals, such as Konsole and JetBrains terminal, to ensure the fix works across environments.

Example

No code snippet is provided as the issue does not contain specific code references.

Notes

The solution may require modifications to the Claude Code renderer, and the exact implementation details are not provided in the issue.

Recommendation

Apply a workaround, such as manually stripping leading and trailing whitespace, until a permanent fix is implemented, as there is no clear indication of a fixed version available.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [Feature Request] TUI gutter and trailing padding make copy-paste tedious [1 comments, 2 participants]