mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-11-21 15:41:17 +00:00
xterm getSelection() turns every physical buffer row into a hard newline, so soft-wrapped TUI output (e.g. Pi agent responses) pastes with broken wraps and display padding. Rebuild clipboard text from buffer coordinates: trim row padding, join isWrapped rows, keep real hard breaks. Use the helper on copy-on-select, context/hotkey copy, paste-selection, and add-selection-to-AI paths. Fixes #2162