Skip to content

fix: copy-all reads raw output instead of wrapped terminal text#101

Merged
hyldmo merged 1 commit into
mainfrom
hyldmo/fix-copy-wrapped-output
Apr 15, 2026
Merged

fix: copy-all reads raw output instead of wrapped terminal text#101
hyldmo merged 1 commit into
mainfrom
hyldmo/fix-copy-wrapped-output

Conversation

@hyldmo
Copy link
Copy Markdown
Owner

@hyldmo hyldmo commented Apr 15, 2026

Summary

  • Copy all (Y key) now copies unwrapped output — reads from the log file instead of ghostty's getText(), which wraps lines to terminal width
  • Clear (Alt+L) no longer truncates log files — clear is UI-only; a byte offset tracks where copy-all should start reading from
  • Removed LogWriter.truncate() method (was destructive, no longer needed)

Test plan

  • Existing log-writer tests pass (32 pass)
  • Manual: run a process with long output lines, resize terminal narrower, press Y — copied text should have original line lengths
  • Manual: clear pane with Alt+L, generate more output, press Y — only post-clear output should be copied
  • Manual: verify log files in --log-dir still contain full history after clearing

🤖 Generated with Claude Code

The Y key (copy all) was reading from ghostty's getText() which returns
text wrapped to terminal width. Now reads from the log file which has
the raw, unwrapped process output.

Also preserves log files on pane clear (Alt+L) — clear is now UI-only.
A byte offset tracks where "copy all" should start reading from after
a clear, without deleting any log data.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@hyldmo hyldmo merged commit bdff415 into main Apr 15, 2026
2 checks passed
@hyldmo hyldmo deleted the hyldmo/fix-copy-wrapped-output branch April 15, 2026 22:33
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 2.12.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant