summaryrefslogtreecommitdiff
path: root/src/ninep/events.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/ninep/events.zig')
-rw-r--r--src/ninep/events.zig10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ninep/events.zig b/src/ninep/events.zig
index a4094e57..6fd0d345 100644
--- a/src/ninep/events.zig
+++ b/src/ninep/events.zig
@@ -835,7 +835,7 @@ pub fn writeEvent(p: *Pardes, asked: Req, id: usize) Reply {
p.look_missed = false;
look.lookAt(p, live, text);
p.fs.results_len = 0;
- if (!p.look_missed) if (p.panes[p.active]) |found| {
+ if (!p.look_missed) if (p.panes[p.view().active]) |found| {
p.fs.results[0] = found.serial;
p.fs.results_len = 1;
};
@@ -1334,9 +1334,9 @@ test "an empty range written back is expanded as a click at that point would be"
try testing.expectEqual(Status.ok, wr(p, event, "ML1 1\n").reply.status);
try testing.expectEqual(pane_files.State.Range{ .q0 = 8, .q1 = 11 }, pane_files.dotOf(pane));
// An exec at 15 runs the word there, `Newcol`.
- const cols = p.ncol;
+ const cols = p.view().ncol;
try testing.expectEqual(Status.ok, wr(p, event, "MX15 15\n").reply.status);
- try testing.expectEqual(cols + 1, p.ncol);
+ try testing.expectEqual(cols + 1, p.view().ncol);
}
test "opens of the log share the open records, and a closed one frees its record" {
@@ -1366,13 +1366,13 @@ test "a click in the body reports the offsets of the word it takes, so the recor
_ = wr(p, Node.of(scratch, .body), text);
for ([_]u32{ serialOf(p), scratch }) |serial| {
const id = p.paneBySerial(serial).?;
- p.active = p.paneBySerial(if (serial == scratch) serialOf(p) else scratch).?;
+ p.view().active = p.paneBySerial(if (serial == scratch) serialOf(p) else scratch).?;
const event = Node.of(serial, .event);
const h = call(p, .{ .tag = 1, .op = .open, .node = event }).reply.handle;
var frame = std.heap.ArenaAllocator.init(gpa);
defer frame.deinit();
_ = try p.render(frame.allocator());
- const rect = p.rects[id];
+ const rect = p.view().rects[id];
const x0 = rect.x + config.GUTTER + config.PREFIX_W;
const y0 = rect.y + p.panes[id].?.tag_rows;
const tab: u16 = config.tab_now;