IssueRaiser

Copy/paste from terminal includes unwanted indentation and trailing spaces

## Description When copying text (paragraphs or code blocks) from Claude Code terminal output, the copied text includes: 1. Leading tabs/spaces at the beginning of each line (matching the visual indentation used to align with the `>` or `·` prompt symbols) 2. Extra spaces at the end of lines This makes pasted content require manual cleanup to remove the formatting artifacts. ## Observed behavior - Copying a code block or paragraph from the terminal includes the visual padding as actual characters - Every line starts with indentation matching the prompt alignment - Lines have trailing whitespace ## Expected behavior - Copied text should not include the visual indentation used for prompt alignment - Code blocks especially should copy as clean, unindented code (unless the code itself is indented) ## Additional context User reported this appeared to be fixed briefly (code blocks were copying without the leading indentation) but the behavior has since regressed, suggesting a fix may have existed but was reverted or overwritten. ## Environment - Platform: Linux - Terminal: CLI

Posted by radrob2 on Jan 14, 2026, 3:18 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.2,000 issues0 comments

github (Sysadmin)

Copy/paste from terminal includes unwanted indentation and trailing spaces

radrob2Jan 14, 2026, 3:18 PM

## Description When copying text (paragraphs or code blocks) from Claude Code terminal output, the copied text includes: 1. Leading tabs/spaces at the beginning of each line (matching the visual indentation used to align with the `>` or `·` prompt symbols) 2. Extra spaces at the end of lines This makes pasted content require manual cleanup to remove the formatting artifacts. ## Observed behavior - Copying a code block or paragraph from the terminal includes the visual padding as actual characters - Every line starts with indentation matching the prompt alignment - Lines have trailing whitespace ## Expected behavior - Copied text should not include the visual indentation used for prompt alignment - Code blocks especially should copy as clean, unindented code (unless the code itself is indented) ## Additional context User reported this appeared to be fixed briefly (code blocks were copying without the leading indentation) but the behavior has since regressed, suggesting a fix may have existed but was reverted or overwritten. ## Environment - Platform: Linux - Terminal: CLI

Comments (0)

No comments yet. Start the discussion.

Comment on this issue