What do you want to change?
Stop the renderer from appending trailing spaces, it already clears each line with \x1b[2K before writing so the trailing space serve no visual purpose they just pollute the clipboard.
Why?
Copying output from pi running in VS Code's integrated terminal includes trailing whitespace on every line, padding each line to the full terminal width.
xterm.js trims empty (unwritten) cells on copy but preserves real space characters. The TUI components (Markdown, Text, Box, TruncatedText) pad every rendered line to the terminal width with space characters. The renderer already clears each line with \x1b[2K before writing, so the trailing spaces serve no visual purpose — they just pollute the clipboard.
iTerm masks this with its own trim-on-copy. xterm.js-based terminals (VS Code, any Electron app) do not.
How? (optional)
Proposed Fix: #6248
What do you want to change?
Stop the renderer from appending trailing spaces, it already clears each line with \x1b[2K before writing so the trailing space serve no visual purpose they just pollute the clipboard.
Why?
Copying output from pi running in VS Code's integrated terminal includes trailing whitespace on every line, padding each line to the full terminal width.
xterm.js trims empty (unwritten) cells on copy but preserves real space characters. The TUI components (Markdown, Text, Box, TruncatedText) pad every rendered line to the terminal width with space characters. The renderer already clears each line with \x1b[2K before writing, so the trailing spaces serve no visual purpose — they just pollute the clipboard.
iTerm masks this with its own trim-on-copy. xterm.js-based terminals (VS Code, any Electron app) do not.
How? (optional)
Proposed Fix: #6248