From 591d3c7baecc434527d02e5894ac0240d2fa1c8d Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Wed, 30 Sep 2026 21:10:00 -0300 Subject: :N on a PDF turns to page N, from the pane and from the root's look; @pN:N answers ok with no err; an address in a pane with no text names the pane A PDF pane took :N as a word to search for, and @p:N failed as "is no text to address" after the page had nothing to do with it, an err in the log for a look that meant something. A PDF's address is now its page: :N turns to it, one past the last is the has-no-page miss, and a byte offset or a pattern is refused saying a PDF's address is a page. The refusal for any other textless pane named an empty path when the look was a bare :addr; it names the image or @p now. Co-Authored-By: Claude Opus 5.5 --- src/ninep/ctl.zig | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/ninep/ctl.zig') diff --git a/src/ninep/ctl.zig b/src/ninep/ctl.zig index 4aa38292..a14b1efb 100644 --- a/src/ninep/ctl.zig +++ b/src/ninep/ctl.zig @@ -1671,6 +1671,16 @@ test "Save path of a file pane logs a save record naming that path" { try testing.expect(th.logHas(p, try std.fmt.bufPrint(&want, "save {d} /tmp/pardes-save-copy.txt\n", .{serial}))); } +test "an address looked at in an image pane names the image, never an empty subject" { + const p = try withFile(testing.allocator, "x\n"); + defer p.deinit(); + const id = p.freeSlot().?; + const doc = try p.newDocPane(id); + doc.image = .{ .path = try p.gpa.dupe(u8, "/tmp/pardes-pic.ppm") }; + _ = wr(p, Node.of(doc.serial, .look), ":/x/\n"); + try testing.expect(th.logHas(p, "look: /tmp/pardes-pic.ppm is no text to address")); +} + test "Save and Save path on an image pane are refused with why, never a silent success" { const p = try withFile(testing.allocator, "x\n"); defer p.deinit(); -- cgit v1.3