summaryrefslogtreecommitdiff
path: root/src/ninep/tree.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/ninep/tree.zig')
-rw-r--r--src/ninep/tree.zig10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ninep/tree.zig b/src/ninep/tree.zig
index 27091112..af1c589d 100644
--- a/src/ninep/tree.zig
+++ b/src/ninep/tree.zig
@@ -1560,3 +1560,13 @@ test "an a, c or i text cut short through exec is an err in the log, not a msg"
try testing.expect(!th.logHas(p, "msg 1 Edit: a, c or i"));
try testing.expectEqualStrings("abc\n", p.panes[0].?.file.?.content);
}
+
+test "a pane made from pane/new goes last in its column, even when the last pane has no room to halve" {
+ const p = try th.withFile(testing.allocator, "x\n");
+ defer p.deinit();
+ for (0..3) |_| {
+ const made = call(p, .{ .tag = 1, .op = .open, .node = @intFromEnum(TopFile.new) }).reply.handle;
+ p.sync();
+ try testing.expectEqual(made, p.panes[p.col_panes[0][p.col_n[0] - 1]].?.serial);
+ }
+}