diff options
Diffstat (limited to 'src/Query.zig')
| -rw-r--r-- | src/Query.zig | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/Query.zig b/src/Query.zig index 87c9d3bd..afda600c 100644 --- a/src/Query.zig +++ b/src/Query.zig @@ -451,7 +451,7 @@ fn produce(p: *Pardes, id: usize, tick: bool, keyed: bool) void { if (changed) { if (a.pat.len == 0) { if (set.from == rp.serial) set.clear(p.gpa); - set.restore(p, owner); + set.restore(owner); } else set.search(p, owner, .typed, rp.serial, a.pat, false, set.origin(owner), p.active == id); } // The owner edited: its places shifted at once; the rows follow @@ -1454,7 +1454,7 @@ fn clearPlaces(p: *Pardes, serial: u32, owner_id: ?usize) void { for (p.panes, 0..) |slot, i| { const tp = slot orelse continue; if (tp.places.from != serial) continue; - if (owner_id != null and owner_id.? == i) tp.places.restore(p, tp); + if (owner_id != null and owner_id.? == i) tp.places.restore(tp); tp.places.clear(p.gpa); } } @@ -1895,7 +1895,7 @@ pub fn cancel(p: *Pardes, id: usize) void { const owner_id = p.paneBySerial(q.owner); for (p.panes) |slot| if (slot) |tp| { if (tp.places.from != rp.serial and tp.serial != q.owner) continue; - tp.places.restore(p, tp); + tp.places.restore(tp); tp.places.forget(p.gpa); if (tp.places.from == rp.serial) tp.places.clear(p.gpa); }; @@ -2279,7 +2279,6 @@ test "a / query: Enter lands and freezes, the register filled, n and N step sile try std.testing.expectEqual(@as(?usize, 3), pane.places.current); typeKeys(p, "n"); try std.testing.expectEqual(@as(?usize, 0), pane.places.current); - try std.testing.expect(pane.places.wrapped); try std.testing.expectEqual(logged, p.messages.len); typeKeys(p, "N"); try std.testing.expectEqual(@as(?usize, 3), pane.places.current); @@ -2444,11 +2443,11 @@ test "zz query timings on the 1.2 MB stress file (QUERY_TIMES=<path>)" { _ = try p.render(frame.allocator()); const Clock = struct { fn step(pp: *Pardes, fr: *std.heap.ArenaAllocator, ev: pardes.Event) !u64 { - const t0 = Places.nowNs(); + const t0 = pardes.FrameStats.nowNs(); pp.update(ev); _ = fr.reset(.retain_capacity); _ = try pp.render(fr.allocator()); - return Places.nowNs() - t0; + return pardes.FrameStats.nowNs() - t0; } }; var report: std.ArrayList(u8) = .empty; |
