diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-29 07:28:59 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:16 -0300 |
| commit | 07706163ab3a5dfbb2c6940ac6e5966b19e0074e (patch) | |
| tree | 404c2b621095da0cf9a7c8e106f66592a34c3fc7 /src/detached/server.zig | |
| parent | 22fb8b6147f7fb72407af80c36d5e99e4664fea2 (diff) | |
| download | pardes-07706163ab3a5dfbb2c6940ac6e5966b19e0074e.tar.gz pardes-07706163ab3a5dfbb2c6940ac6e5966b19e0074e.zip | |
A detached session no frontend has sized is 160x50, not 80x24
At 80x24 a script's third or fourth pane/new was refused for want of
rows. `size` still sets any other size, and a frontend attaching its own.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/detached/server.zig')
| -rw-r--r-- | src/detached/server.zig | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/detached/server.zig b/src/detached/server.zig index bb66b841..13cf4488 100644 --- a/src/detached/server.zig +++ b/src/detached/server.zig @@ -1201,11 +1201,20 @@ fn onQuitSignal(_: std.posix.SIG) callconv(.c) void { if (quit_wake >= 0) _ = libc.send(quit_wake, "q", 1, nosignal); } +/// The screen of a detached session no frontend has sized. +pub const detached_cols = 160; +pub const detached_rows = 50; + pub fn run(init: std.process.Init, opts: pardes.Options, name: []const u8) !void { const gpa = init.gpa; const allocs = pardes.memory.init(gpa); defer pardes.memory.deinit(); var options = opts; + // No frontend yet, so no size to take: one roomy enough for a script's + // panes (80x24 left pane/new refused after a few); `size` sets another, + // and an attaching frontend its own. + options.cols = detached_cols; + options.rows = detached_rows; options.image_allocator = allocs.image; options.pdf_allocator = allocs.pdf; options.tree_sitter_allocator = allocs.tree_sitter; |
