From 18d89dcedaed1f8437799621675e88ca47d7cdc1 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Sat, 24 Oct 2026 10:29:10 -0300 Subject: Search converge 2/6: a pane's places, every match or listed place tinted and ticked on the rail, n/N stepping them silently, shifted by an edit rather than searched again --- src/pardes.zig | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/pardes.zig') diff --git a/src/pardes.zig b/src/pardes.zig index c58452ee..c4011f7d 100644 --- a/src/pardes.zig +++ b/src/pardes.zig @@ -44,6 +44,7 @@ pub const ImagePlace = @import("surface.zig").ImagePlace; pub const Surface = @import("surface.zig").Surface; pub const Region = @import("surface.zig").Region; pub const Chrome = @import("surface.zig").Chrome; +pub const RailTick = @import("surface.zig").RailTick; pub const MAX_REGIONS = @import("surface.zig").MAX_REGIONS; pub const builtins = @import("builtins.zig"); /// Every builtin as JSON, for the docs (tools/gen_builtins_json.zig). @@ -484,6 +485,7 @@ test { _ = @import("Presentation.zig"); _ = @import("animation.zig"); _ = @import("pager.zig"); + _ = @import("Places.zig"); } pub const Builtin = builtins.registry.Builtin(); @@ -5081,6 +5083,7 @@ pub const Pardes = struct { pane.tag.deinit(p.gpa); pane.input.deinit(p.gpa); pane.jump.deinit(p.gpa); + pane.places.deinit(p.gpa); panes.terminal.deinitEmulator(pane, p.gpa); pane.clearCwd(); pane.fs.deinit(p.gpa); @@ -6115,6 +6118,9 @@ pub const Pardes = struct { look.advanceLookHover(p); }, } + // Each pane's places find a frame's more on a tick, and on any other + // step the ones an edit or a scroll left unfound in the view. + for (p.panes) |slot| if (slot) |pane| pane.places.settle(p, pane, ev == .tick); _ = p.scratch.reset(.{ .retain_with_limit = memory.limits.scratch_kept }); p.sync(); p.fsReport(); @@ -7580,6 +7586,8 @@ pub const Pardes = struct { // seen are stamped 0, which `advance` would count back from). if (p.fs.batch.bytes.items.len > 0) return @max(next, p.fs.batch.last_ns + ctlfs.pane.batch_pause_ns); if (p.chrome_animation.isActive() or p.presentation.animating()) return next; + // Places still to find resume on the next frame. + for (p.panes) |slot| if (slot) |pane| if (pane.places.busy(pane)) return next; var frames: ?u64 = null; if (p.look_hover_wait) |waiting| { const delay = config.look_preview_delay_frames orelse return next; -- cgit v1.3