diff options
Diffstat (limited to 'src/Handover.zig')
| -rw-r--r-- | src/Handover.zig | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Handover.zig b/src/Handover.zig index 3acfc4e6..ced9baf0 100644 --- a/src/Handover.zig +++ b/src/Handover.zig @@ -110,6 +110,9 @@ pub fn finish(h: *Handover, p: *Pardes, seq: u32, to: []const u8, failure: ?[]co return p.reportFailure(at, std.fmt.bufPrint(&buf, "handover: {s}; the pane stays here", .{why}) catch "handover failed; the pane stays here"); } var kept: usize = 0; + // Moved, not closed: the other window has them now (Store.away). + p.store.away = true; + defer p.store.away = false; for (h.serials[0..h.count], h.revisions[0..h.count]) |serial, revision| { const id = p.paneBySerial(serial) orelse continue; // closed with its owner const pane = p.panes[id].?; @@ -443,6 +446,9 @@ test "a grip let go past the window's edge dumps its pane alone, and closes it o const serial = p.panes[0].?.serial; p.update(.{ .handed = .{ .seq = p.handover.seq, .to = "pardes/1" } }); try std.testing.expect(p.paneBySerial(serial) == null); + // Open in the other window, so not one of this session's closed panes + // (Store.zig): Panes does not offer it back here. + try std.testing.expect(p.store.closedBySerial(serial) == null); p.sync(); try std.testing.expectEqual(@as(usize, 1), p.col_n[layout.findPane(p, other).?.col]); } |
