[BUG] Fullscreen TUI mode doesn't normalize \r\n on paste — ^M characters and doubled blank lines

Resolved 💬 2 comments Opened Apr 22, 2026 by vipuldelwadia Closed Apr 23, 2026

Claude Code version: 2.1.117
OS: macOS
Terminal: Ghostty 1.3.1

Description

When fullscreen TUI mode is active (/tui fullscreen), pasting content with \r\n line endings produces two different symptoms:

  1. ^M characters — pasting terminal output that includes \r (e.g. p10k/Powerlevel10k prompt lines, content pasted via Ghostty's "dangerous paste" confirmation dialog)
  2. Extra blank lines — pasting from sources with \r\n line endings (e.g. Xcode console output) produces a blank line between every content line

Steps to reproduce

  1. Enable fullscreen TUI: /tui fullscreen
  2. Copy any of the following and paste into the input:
  • Terminal output that includes a p10k prompt line
  • Output from Xcode's console
  1. Observe ^M or doubled blank lines in the pasted content (visible via Ctrl+G editor)

Expected behaviour

\r\n normalized to \n on paste, as it is in standard (non-fullscreen) mode.

Workaround

Disable fullscreen TUI, or clean clipboard before pasting:
pbpaste | tr -d '\r' | pbcopy

Notes

  • Standard (non-fullscreen) mode handles paste correctly — this is a fullscreen TUI-specific regression
  • Also reproducible via Ctrl+G editor which shows raw ^M characters throughout pasted content
  • Related: #22385 (closed duplicate — same doubled blank lines symptom, different environment)

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗