diff options
| author | Gabriel Schneider <[email protected]> | 2026-10-01 09:58:15 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 10:36:27 -0300 |
| commit | 70881bb4edd15fe918ee5fed4ed3e8922bc7fc6a (patch) | |
| tree | 18d80a3172d054cd152f78f56d82150f914b81f2 /src/pardes.zig | |
| parent | caa8ed077e8b9b67d18f18b3ec46891bd8d310a7 (diff) | |
| download | pardes-70881bb4edd15fe918ee5fed4ed3e8922bc7fc6a.tar.gz pardes-70881bb4edd15fe918ee5fed4ed3e8922bc7fc6a.zip | |
A command or terminal pane refused for room is refused before anything is logged or answered of it, and a serial is never handed out twice
A command pane with no room logged `new N` and `run N ls`, was answered
to its exec, then went with `del N` and no `exit N`; and sync gave N
back (`next_serial -= 1`) to the next pane made, so a script holding N
found another pane under it. Tty did the same. Both now take a refused
placement back at once, before the run is logged or the serial answered
(the pane was never announced, so it leaves no record), and fail the
write with no room. The decrement is gone: gaps are fine, and a serial
once said names one pane for good.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/pardes.zig')
| -rw-r--r-- | src/pardes.zig | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/pardes.zig b/src/pardes.zig index 0690b7eb..4e578791 100644 --- a/src/pardes.zig +++ b/src/pardes.zig @@ -7119,13 +7119,9 @@ pub const Pardes = struct { var refused = false; while (p.unplaced.findFirstSet()) |id| { p.unplaced.unset(id); - if (p.panes[id]) |pane| { - // Refused, it was never there: the serial it took is the - // next pane's, as a refused Newcol's column serial is. - const newest = pane.serial == p.next_serial; - p.removePane(id, null) catch {}; - if (newest and p.panes[id] == null) p.next_serial -= 1; - } + // Refused, it was never there. Its serial is not handed out + // again: one logged or answered names this pane for good. + if (p.panes[id] != null) p.removePane(id, null) catch {}; refused = true; } // A refused pane gone, no pane it squeezed stays under its minimum. |
