From be11a4e58e86d9b299accd3688c89d3c3a7b4b0c Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 29 Sep 2026 11:16:17 -0300 Subject: The writes of one open of data, body or xdata are one undo step bash line-buffers its stdout, so printf 'x\ny\nz\n' > data arrives as three writes and took three Undos. A write now leaves the join mark a truncation already left, so the next write on the file joins its step until the open is released; a truncation and any other edit start a step of their own. Co-Authored-By: Claude Opus 5.5 --- .agents/skills/pardes-9p/SKILL.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to '.agents') diff --git a/.agents/skills/pardes-9p/SKILL.md b/.agents/skills/pardes-9p/SKILL.md index 1fe2aed8..e5affebe 100644 --- a/.agents/skills/pardes-9p/SKILL.md +++ b/.agents/skills/pardes-9p/SKILL.md @@ -264,8 +264,9 @@ env printf 'Edit ,x/foo/{\ni//\n}\n' > $pane/ctl | Delete that range | `: > $pane/data` | truncate `data` (open with OTRUNC) | A write leaves `addr` just past what it wrote, so a second `echo x > data` -inserts after the first: write `addr` again before each replacement. Each -`data` write is one undo step; to make a loop's writes one, `echo 1 > mark` +inserts after the first: write `addr` again before each replacement. The +writes of one open of `data` are one undo step (a multi-line `printf` too); +to make a loop's writes one, `echo 1 > mark` (an undo point now), `echo 0 > mark`, the writes, then `echo 1 > mark`. A `+New` scratch counts as unsaved (and holds up Exit, Restore, Del) only once it holds 100 bytes or more. A read -- cgit v1.3