From 4dc55f7e3ae8232e6994b92e6b1948bd8c190baf Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 29 Sep 2026 06:10:43 -0300 Subject: A new pane with no room under the last goes last all the same A pane from pane/new or New takes the bottom half of its column's last pane, as acme's coladd does (cols.c:62-65); when that pane is too short to give it a tag and 2 rows, the fallback halved the tallest pane and put the new one under it, mid-column (the 7 9 8 found). It now goes last all the same, with half the tallest pane's rows (its tag measured at the column's width). Tty from a pane's ctl already follows acme's makenewwindow (the active column first, util.c:456-467); fs.md now says so rather than beside that pane. Co-Authored-By: Claude Opus 5.5 --- src/ninep/tree.zig | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/ninep/tree.zig') 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); + } +} -- cgit v1.3