diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-28 10:18:59 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:14 -0300 |
| commit | d9c6786e19567878e3c89ae212296ce941484096 (patch) | |
| tree | 23b973692fc258bd7910cadf135d06776015da6f /src/fs-help.txt | |
| parent | 5b27be228f5961dee8727bec7480f375dfb588ed (diff) | |
| download | pardes-d9c6786e19567878e3c89ae212296ce941484096.tar.gz pardes-d9c6786e19567878e3c89ae212296ce941484096.zip | |
Truncating data or xdata deletes only the addressed range, not the whole body
A shell's echo NEW > data opens data with OTRUNC, and truncate() spliced
the whole body away before the write replaced the addressed range: a
five-byte replacement erased a buffer. data and xdata hold what addr
names, so truncating one now deletes that range and nothing else; > on
data replaces the range and : > data deletes it, and only truncating
body clears the buffer.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/fs-help.txt')
| -rw-r--r-- | src/fs-help.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fs-help.txt b/src/fs-help.txt index b6812318..3f7357d4 100644 --- a/src/fs-help.txt +++ b/src/fs-help.txt @@ -38,7 +38,7 @@ Pitfalls, one each: rmdir closes a pane even when it is dirty; index and pane/<n>/dirty show the flag. addr, dot and limit read the same pair of offsets they take, so cp between them works. dirty, mark and scroll read "0" or "1" and take "0" or "1"; truncating limit lifts it. - Writing body appends; open it with truncation to replace; writes are whole UTF-8 sequences. + body: >> appends, > replaces it all. data: > replaces (and : > deletes) just the addr range. tag reads path++text; writes append to the text (newlines too); truncating clears it, and dot or addr. A terminal's body is a history snapshot frozen per open; pty/data is the live stream. A failing command is reported in the editor and in log, not as a write error; a bad line fails the write. |
