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 --- test/behaviour/keys.zig | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'test/behaviour/keys.zig') diff --git a/test/behaviour/keys.zig b/test/behaviour/keys.zig index 476504ce..eeaacf7d 100644 --- a/test/behaviour/keys.zig +++ b/test/behaviour/keys.zig @@ -323,30 +323,6 @@ test "keys: SPC j n from the pane a Look gave the keyboard walks back into the c try std.testing.expect(std.mem.startsWith(u8, try s.read(sel), "Theme ")); } -test "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" { - var tmp = std.testing.tmpDir(.{}); - defer tmp.cleanup(); - try tmp.dir.writeFile(std.testing.io, .{ .sub_path = "look-owner.txt", .data = "alpha target\nbeta target\ngamma target\n" }); - var dir: [4096]u8 = undefined; - const at = dir[0..try tmp.dir.realPath(std.testing.io, &dir)]; - var s = try Session.initFile(std.testing.allocator, "x\n"); - defer s.deinit(); - try s.write("/ctl", "LookWord list\n"); // the +Search listing is what is walked - try s.write("/look", s.at("{s}/look-owner.txt\n", .{at})); - const file = try s.focused(); - try s.write(s.at("/pane/{d}/exec", .{file}), "Look target\n"); - try std.testing.expectEqual(file, try s.focused()); - // The Look took the first; the walk goes on from it, and back. - try s.keys(" jn"); - const results = try s.focused(); - try std.testing.expect(results != file); - const sel = s.at("/pane/{d}/sel", .{results}); - try s.expect(sel, "look-owner.txt:2:6-11"); - try s.keys(" jp"); - try std.testing.expectEqual(results, try s.focused()); - try s.expect(sel, "look-owner.txt:1:7-12"); -} - /// Screen row `row` as drawn. fn screenRow(s: *Session, row: usize) ![]const u8 { var rows = std.mem.splitScalar(u8, try s.screen(), '\n'); -- cgit v1.3