diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-22 14:14:39 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-22 15:36:59 -0300 |
| commit | b0e96978b619e1111ee2fb30e3c4a48f9fac38b3 (patch) | |
| tree | da0c3c266b52c84ab6d96f1652f17b80effab342 /dev/gui | |
| parent | 85e793ae92683808d14433cb7c99ccdab4c967dc (diff) | |
| download | pardes-b0e96978b619e1111ee2fb30e3c4a48f9fac38b3.tar.gz pardes-b0e96978b619e1111ee2fb30e3c4a48f9fac38b3.zip | |
pty: a shell forks at its pane's grid, and the core hands its host every pty's size, pixels too (pardes-term-join-9, item 2 (B), points (a) and (c)): the spawn host call took no size and both hosts forked at the session's live screen (dev/Ptys.zig `spawn`, runtime/macos.zig `spawnShell`: `core.view().screen_h/w`), so a shell started again into a pane already sized (pty/ctl's exec, a finished command pane run again by exec.zig `runCommand`, a Restore's `revivePane`) ran at the screen's size and nothing resized it, the grid unchanged and `sync` emitting nothing (`stty size` said 50 160 in a 44x158 pane); and a pty's pixels were the live view's (host_io.zig `ptyWinsize` read `core.view().cell_pixels`) whichever view sized it; now `Effect.PtySize` (cells and pixels) is what the core gives its host for `spawn` and `pty_resize`, made by `Core.ptySize` from the pane's grid (or 9P's numbers) at the cell of the view that sizes it, a spawn performed after its step's `sync` reading the laid-out grid, and the hosts fork and size from it alone (`Ptys.take` sizes an adopted shell from it too: 1x1 then the size, once, its forced redraw kept, an ioctl to the size a pty has already sending no SIGWINCH); test (test/process/terminals.zig, a new case): a Term pane's shell, the same shell started again by pty/ctl's exec and a finished command pane run again each say the grid their pty/ctl reads back (fails on the base: 50 160 against 44 158); not covered: a new command pane made over 9P is placed a step after its fork, so its first size can still be the screen's
Co-Authored-By: Claude Opus <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'dev/gui')
| -rw-r--r-- | dev/gui/gui.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dev/gui/gui.zig b/dev/gui/gui.zig index bfe658f9..d9d38f06 100644 --- a/dev/gui/gui.zig +++ b/dev/gui/gui.zig @@ -7677,7 +7677,7 @@ test "a detached GUI authority follows terminal directory changes with no window defer ptys.deinit(); var no_peers: replica.Peers = .{}; var shell: Shell = .{ .core = core, .io = io, .gpa = gpa, .lsp_allocator = gpa, .ptys = &ptys, .queue = &queue, .watches = undefined, .peers = &no_peers }; - const child = try host_io.forkShell(null, 0, &rcs, "/bin/sh", start, 24, 80); + const child = try host_io.forkShell(null, 0, &rcs, "/bin/sh", start, .{ .cols = 80, .rows = 24 }); ptys.slots[0] = .{ .fd = child.file.handle, .pid = child.pid }; try std.testing.expect(host_io.writeFd(child.file.handle, "cd child\n")); const until = std.Io.Clock.awake.now(io).toMilliseconds() + 2_000; |
