diff options
Diffstat (limited to 'test/perf.zig')
| -rw-r--r-- | test/perf.zig | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/perf.zig b/test/perf.zig index 55b64a99..fbe6fa49 100644 --- a/test/perf.zig +++ b/test/perf.zig @@ -564,13 +564,13 @@ fn measure(op: Op, fx: Fixture, path: []const u8, expected_bytes: usize, reps: u pardes.look.lookAt(core, 0, path); pump(core); const id = filePane(core) orelse return error.OpenDidNotOpenFile; - core.active = id; + core.view().active = id; const pane = core.panes[id].?; _ = try frame(core); if (op == .edit_twin) { if (!core.executeBuiltinLine(id, "Zerox")) return error.ZeroxRefused; pump(core); - core.active = id; + core.view().active = id; _ = try frame(core); } if (op == .edit_char or op == .edit_twin) { @@ -589,7 +589,7 @@ fn measure(op: Op, fx: Fixture, path: []const u8, expected_bytes: usize, reps: u if (op != .deep_selection) seek(pane, fx, n); _ = try frame(core); // settle the view at the new spot, untimed const before = .{ .row = pane.body.cur_row, .col = pane.body.cur_col, .scroll = pane.scroll(), .len = pane.file.?.content.len }; - const rect = core.rects[id]; + const rect = core.view().rects[id]; const wheel_col = rect.x + pardes.config.GUTTER; const wheel_row = rect.y + pardes.BOX_H; const t0 = nowNs(); @@ -768,7 +768,7 @@ fn terminalBatch(buffer: []u8, batch: usize, cols: u16) ![]const u8 { fn checkTerminalTail(core: *pardes.Pardes, surface: *pardes.Surface, batch: usize) !void { const pane = core.panes[0] orelse return error.MissingTerminal; - const rect = core.rects[0]; + const rect = core.view().rects[0]; const x = rect.x + pardes.config.GUTTER; const y = rect.y + pardes.BOX_H + pardes.panes.terminal.gridCursor(pane).y; var expected_buffer: [32]u8 = undefined; @@ -1486,9 +1486,9 @@ fn miniMeasurement(fallback: std.mem.Allocator, probe: MiniProbe, path: []const if (core) |p| { pump(p); try pardes.panes.mini.open(p, 0, path); - for (p.panes, 0..) |slot, id| if (slot != null and id != p.active) try p.removePane(id, null); + for (p.panes, 0..) |slot, id| if (slot != null and id != p.view().active) try p.removePane(id, null); pump(p); - const file = p.panes[p.active].?.file.?; + const file = p.panes[p.view().active].?.file.?; try checkMini(.{ .content = file.content, .colors = file.mini.?.colors }, expected); } var frame_hash: ?u64 = null; |
