summaryrefslogtreecommitdiff
path: root/src/main.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-06 12:52:43 -0300
committerGabriel Schneider <[email protected]>2026-11-06 14:56:36 -0300
commitcf9e075d3537698e76a8fb22dc1a63622ca78c45 (patch)
tree30fd1c4964426f5083f8526a8d82147cc25686ec /src/main.zig
parent66f032821a0a7bebe08e852db170e0f282a02f48 (diff)
downloadpardes-cf9e075d3537698e76a8fb22dc1a63622ca78c45.tar.gz
pardes-cf9e075d3537698e76a8fb22dc1a63622ca78c45.zip
idioms #8, two more of each: config's switchedTo reads on or off through stringToEnum, and main's pager line, a working directory of 4096 into 4200, is catch unreachable where a lone newline stood for an overflow it cannot have
Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/main.zig')
-rw-r--r--src/main.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.zig b/src/main.zig
index 7b6fd6d4..3401c0b4 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -157,7 +157,7 @@ fn pageInto(io: std.Io, gpa: std.mem.Allocator, dial: []const u8, text: []const
if (c < ' ' or c == 0x7f) break false;
} else !pardes.filesystem.deniedAbove(cwd);
var line_buf: [4200]u8 = undefined;
- const dir_line = std.fmt.bufPrint(&line_buf, "{s}\n", .{if (plain) cwd else ""}) catch "\n";
+ const dir_line = std.fmt.bufPrint(&line_buf, "{s}\n", .{if (plain) cwd else ""}) catch unreachable; // a cwd of 4096 fits 4200
// Its serial read back on the open that asked, once the text is in:
// another client's exec meanwhile can never send it into that
// client's pane.