mirror of
https://github.com/zed-industries/zed.git
synced 2026-11-27 11:02:33 +01:00
6501df1576
ACP v2 terminal chunks and snapshots were written to the emulator without line-ending normalization. Commands run without a PTY emit bare `\n`, which moves the cursor down without returning it to column zero, so each line renders further right than the last. ACP v1 output already avoids this by going through `Terminal::write_output`. This sends v2 chunks and snapshots through `write_output` too, and removes `write_raw_output`, which no longer has any production callers. A `\r\n` split across two chunks gains an extra `\r`, which has no visible effect. One tradeoff: a program running under a real PTY that deliberately uses a bare `\n` to move down while keeping its column will now return to column zero. There are fixes for both Claude and Codex adapters, but it seems to be a common thing and we had this behavior in ACP v1 already. Release Notes: - Fixed misaligned lines in terminal output from ACP agents