diff options
Diffstat (limited to 'core/look.zig')
| -rw-r--r-- | core/look.zig | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/look.zig b/core/look.zig index ee6debf9..8356dca8 100644 --- a/core/look.zig +++ b/core/look.zig @@ -2626,7 +2626,7 @@ test "Incl's directories find a name found nowhere else, <name> too; bare Incl l } // Bare, it lists them. try std.testing.expect(p.executeBuiltinLine(0, "Incl")); - try std.testing.expect(std.mem.indexOf(u8, pane.msg[0..pane.msg_len], "/inc") != null); + try std.testing.expect(std.mem.indexOf(u8, p.messages.saidBy(pane), "/inc") != null); // A dump keeps them. try pardes.dump.dumpState(p); const restored = try pardes.dump.restore(p, p.dump_out.?, "/tmp/pardes.dump.zon"); @@ -2764,7 +2764,7 @@ test "Look on a diff line is the look of the address it names, selected by hand: .active_path = try std.testing.allocator.dupe(u8, if (shown.file) |f| f.path else ""), .row = shown.body.cur_row, .missed = p.look_missed, - .msg = try std.testing.allocator.dupe(u8, pane.msg[0..pane.msg_len]), + .msg = try std.testing.allocator.dupe(u8, p.messages.saidBy(pane)), .panes = n, }; } @@ -2810,7 +2810,7 @@ test "Plumb: a look sends what it looks at, the rules written first: a rule's wo lookAt(p, 0, pic); try std.testing.expectEqual(@as(usize, 0), p.view().active); var said_buf: [4300]u8 = undefined; - try std.testing.expectEqualStrings(try std.fmt.bufPrint(&said_buf, "svg {s}", .{pic}), pane.msg[0..pane.msg_len]); + try std.testing.expectEqualStrings(try std.fmt.bufPrint(&said_buf, "svg {s}", .{pic}), p.messages.saidBy(pane)); // A name open in a pane is focused, never sent. p.look_text = true; lookAt(p, 0, pic); @@ -2821,7 +2821,7 @@ test "Plumb: a look sends what it looks at, the rules written first: a rule's wo p.setMessage(.at(0), "before"); lookAt(p, 0, pic); try std.testing.expectEqual(opened, p.view().active); - try std.testing.expectEqualStrings("before", pane.msg[0..pane.msg_len]); + try std.testing.expectEqualStrings("before", p.messages.saidBy(pane)); // With no web rule, a URL is a word Look searches for. p.view().active = 0; try std.testing.expect(Plumb.apply(p, false, "plumb/rules", "type is text\narg isfile $data\nplumb to edit\n") == null); |
