diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-06 13:16:18 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-06 14:56:36 -0300 |
| commit | a821fe82d8de3d407ebe104358b97719bd983727 (patch) | |
| tree | 46301f10f599983fc1be9b9ac38df8d2e6d0bf71 /src/edit.zig | |
| parent | d78fa4f9d90437dac60d9150e3a6eca868895856 (diff) | |
| download | pardes-a821fe82d8de3d407ebe104358b97719bd983727.tar.gz pardes-a821fe82d8de3d407ebe104358b97719bd983727.zip | |
idioms #19, unreachable only where the type bounds it: the prints that carry a path, a name, a miss or a reason (Core's shell and Dump words, colors' theme file, look's misses and refusals) cut through Kind.Buf at their old size, the header texts flatSurface could still fail on and colors' putName handle the failure again, and every kept site (integers, a same-statement cut into a [K + room] buffer, the hashing and discarding writers) says its bound on its line
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/edit.zig')
| -rw-r--r-- | src/edit.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/edit.zig b/src/edit.zig index d4795c94..4253d293 100644 --- a/src/edit.zig +++ b/src/edit.zig @@ -119,7 +119,7 @@ pub fn applyPaste(p: *Pardes, whole: []const u8) Error!void { const bytes = if (whole.len > limit) whole[0..modal.graphemeStart(whole, limit)] else whole; if (whole.len > limit) { var said: [96]u8 = undefined; - p.setMessage(v.active, std.fmt.bufPrint(&said, "paste cut at its limit, {d} KiB: the rest left out", .{limit / 1024}) catch unreachable); // 67 bytes at most + p.setMessage(v.active, std.fmt.bufPrint(&said, "paste cut at its limit, {d} KiB: the rest left out", .{limit / 1024}) catch unreachable); // a usize and 47 bytes fit 96 } // A prompt answering for a header takes the paste, as it takes keys. const asking = if (p.panes[v.active]) |active| active.prompt != .none else false; |
