summaryrefslogtreecommitdiff
path: root/src/fs.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-30 10:58:24 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:17 -0300
commita96c7e873d26686f0e49cf2882c1336046396d37 (patch)
treea1771b70cdf30c449a0f025ea45ccf141ce46ced /src/fs.zig
parent048e81e3471c73b9ac690901819976f689f6a4ce (diff)
downloadpardes-a96c7e873d26686f0e49cf2882c1336046396d37.tar.gz
pardes-a96c7e873d26686f0e49cf2882c1336046396d37.zip
Pane, column and workspace tags take one set of write checks, and a refused `>` write leaves the tag as it was
A column's or the workspace's tag took any length, so a write past 4096 bytes went in and a later Dump failed on it (bad dump tag), and a truncating open wiped any tag before the write after it could be refused. The column and workspace tags now refuse what a pane tag refuses: the 4096-byte limit (ENOSPC, tag: no space: over 4096 bytes) as well as the control characters they already did. A truncation of any of the three is held until the write after it is known to fit, and done with it; a refused write drops it; a close or read with no write after it does it then (so `: > tag` still clears). A test runs a truncating write too long, a control character and a bare truncation at each kind, and Dumps after. docs/fs.md says so. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/fs.zig')
-rw-r--r--src/fs.zig3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/fs.zig b/src/fs.zig
index 1d0bbc22..e66a6a49 100644
--- a/src/fs.zig
+++ b/src/fs.zig
@@ -1335,6 +1335,9 @@ pub const Namespace = struct {
/// 0 the workspace's, a column's its index + 1; and whether the newline
/// that ended its last write is held back.
header_rewrite: ?u32 = null,
+ /// A column's or the workspace's tag truncated, not yet done (as a
+ /// pane tag's `tag_trunc_pending`): its key, the workspace's 0.
+ header_trunc_pending: ?u32 = null,
/// A look or exec a 9P write made found every pane slot taken; the
/// write fails with what was said, kept at the head of `ename`.
no_pane_slot: bool = false,