diff options
Diffstat (limited to 'src/panes.zig')
| -rw-r--r-- | src/panes.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/panes.zig b/src/panes.zig index 8786de2b..94c9615f 100644 --- a/src/panes.zig +++ b/src/panes.zig @@ -1032,7 +1032,7 @@ pub fn removePane(p: *Pardes, id: usize, to: ?usize) error{OutOfMemory}!void { // Before anything is torn down, so a failure here changes nothing. try deinitPane(p, pane); const gainer = layout.absorbVWeight(p, id, owner orelse to); - const beside = if (emptied) |c| p.besideColumn(c, p.rects[id]) else null; + const beside = if (emptied) |c| layout.besideColumn(p, c, p.rects[id]) else null; layout.removePane(p, id); p.panes[id] = null; if (kept) |k| p.store.close(p, k, gainer); @@ -1260,14 +1260,14 @@ test "owned cwd column close allocates every copy before removing any pane" { const columns = p.col_panes; const counts = p.col_n; allocator.fail_index = allocator.alloc_index + 1; - try std.testing.expectError(error.OutOfMemory, p.removeColumn(0)); + try std.testing.expectError(error.OutOfMemory, layout.removeColumn(p, 0)); for (before, p.panes) |old, current| try std.testing.expectEqual(old, current); try std.testing.expectEqualDeep(columns, p.col_panes); try std.testing.expectEqualDeep(counts, p.col_n); try std.testing.expectEqual(@as(usize, 0), p.effects_len); try std.testing.expect(first_child.cwd == .inherited and second_child.cwd == .inherited); allocator.fail_index = std.math.maxInt(usize); - try p.removeColumn(0); + try layout.removeColumn(p, 0); try std.testing.expect(p.panes[0] == null and p.panes[1] == null); p.sync(); p.sync(); |
