From 2367ed34beccf3f2f1b8bbf6b8a171f50933d7a1 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 5 Nov 2026 00:08:16 -0300 Subject: config, exec, look: Placement, BootShell, LookWord, DirLook and DiffLook go, with what each kept of pardes before it took acme's ways (exec's pardesPlace, atFoot, belowParent, pardesDoc and evictLonePristineTty with mouse.zig's call, layout's splitParent and columnFitsHalves that only they called, look's ls in a terminal for a directory, the word and patch looks' other branches, the SPC c p key, their Help and builtins-JSON rows, their lines in docs/typ and a changelog line), and the tests of them: Dir.zig's "DirLook terminal: a look at a directory opens a terminal there, no pane listing it", pardes.zig's "first document fallback splits like Term from the originating pane", "first document keeps its originating shell and only opens a column when it fits", "BootShell keep leaves the untouched boot shell a dragged document joins; replace closes it" and "a Look on a directory does not type ls into an occupied terminal", keys.zig's "keys: SPC j n and SPC j p walk on from the place a Look's +Search listing chose, its keyboard left in the file", look_and_exec.zig's "look-and-exec: a second LookWord list look in a directory refills its +Search rather than stacking another", placement.zig's "placement: Placement pardes puts a new pane right under the asking one, and bare it steps back to acme", output.zig's "LookNext/LookPrev keeps the result output a Look chose through a no-match answer, and a stale serial once it is deleted", and the snapshot scripts that turned them on (cmdword, doccol, look-dir, lookpanes, rsearch, splitparent, ttylook); the Del question's test makes its middle panes the acme way, a New at the column's foot, and the others that turned one on for their layout run without it Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- src/ninep/cols.zig | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) (limited to 'src/ninep/cols.zig') diff --git a/src/ninep/cols.zig b/src/ninep/cols.zig index 0ee25345..833b25c5 100644 --- a/src/ninep/cols.zig +++ b/src/ninep/cols.zig @@ -564,23 +564,20 @@ test "a column's tag and the workspace's read, replace and append as a pane tag } test "a focus write makes its pane's column the active one: layout says so and pane/new goes there" { - for ([_][]const u8{ "Placement acme", "Placement pardes" }) |placement| { - const p = try th.withFile(testing.allocator, "x\n"); - defer p.deinit(); - try testing.expect(p.executeBuiltinLine(p.active, placement)); - const left = p.panes[0].?.serial; - p.newColumn(p.active); - p.newScratchFor(p.active, .fs); // fills the new, right column - p.sync(); - try testing.expectEqual(@as(usize, 1), layout.findPane(p, p.active).?.col); - var digits: [16]u8 = undefined; - _ = th.wr(p, @backingInt(tree.TopFile.focus), try std.fmt.bufPrint(&digits, "{d}\n", .{left})); - var want: [32]u8 = undefined; - const text = th.rd(p, @backingInt(tree.TopFile.layout), 0, 4096).bytes; - try testing.expect(std.mem.endsWith(u8, text, try std.fmt.bufPrint(&want, "active {d}\n", .{layout.columnSerial(p, 0)}))); - const made = th.call(p, .{ .tag = 1, .op = .open, .node = @backingInt(tree.TopFile.new) }).reply.handle; - try testing.expectEqual(@as(usize, 0), layout.findPane(p, p.paneBySerial(made).?).?.col); - } + const p = try th.withFile(testing.allocator, "x\n"); + defer p.deinit(); + const left = p.panes[0].?.serial; + p.newColumn(p.active); + p.newScratchFor(p.active, .fs); // fills the new, right column + p.sync(); + try testing.expectEqual(@as(usize, 1), layout.findPane(p, p.active).?.col); + var digits: [16]u8 = undefined; + _ = th.wr(p, @backingInt(tree.TopFile.focus), try std.fmt.bufPrint(&digits, "{d}\n", .{left})); + var want: [32]u8 = undefined; + const text = th.rd(p, @backingInt(tree.TopFile.layout), 0, 4096).bytes; + try testing.expect(std.mem.endsWith(u8, text, try std.fmt.bufPrint(&want, "active {d}\n", .{layout.columnSerial(p, 0)}))); + const made = th.call(p, .{ .tag = 1, .op = .open, .node = @backingInt(tree.TopFile.new) }).reply.handle; + try testing.expectEqual(@as(usize, 0), layout.findPane(p, p.paneBySerial(made).?).?.col); } test "a refused write after a truncation leaves every kind of tag as it was, and Dump still works" { -- cgit v1.3