From a7960117dfb83ad65a0466a96affbbb524936b7f Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 29 Sep 2026 03:14:31 -0300 Subject: A detached session with no frontend takes its size from the root ctl A --detach session nobody is attached to stayed 80x24, too small for an agent's panes, and nothing could change it. The root ctl takes size while no frontend is attached (refused while one owns the size), and a client that attaches later still sets its own (the server compares with the core's size). Documented with the 80x24 default. Co-Authored-By: Claude Opus 5.5 --- src/detached/server.zig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/detached') diff --git a/src/detached/server.zig b/src/detached/server.zig index 8f45135a..af299051 100644 --- a/src/detached/server.zig +++ b/src/detached/server.zig @@ -1076,7 +1076,9 @@ pub const Session = struct { rows = if (rows == 0) c.rows else @min(rows, c.rows); } var regridded = false; - if (cols != 0 and (cols != s.cols or rows != s.rows)) { + // Against the core's size too: a root ctl `size` may have set it + // while nobody was attached. + if (cols != 0 and (cols != s.cols or rows != s.rows or cols != s.core.screen_w or rows != s.core.screen_h)) { s.cols = cols; s.rows = rows; for (&s.clients) |*c| c.need_full = true; -- cgit v1.3