summaryrefslogtreecommitdiff
path: root/src/pardes.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-24 10:29:10 -0300
committerGabriel Schneider <[email protected]>2026-10-24 10:29:10 -0300
commit18d89dcedaed1f8437799621675e88ca47d7cdc1 (patch)
tree2cf2e2ae46de1308e5b90aca33413282cdd73e8b /src/pardes.zig
parent873f81ccb1449119846de8d4e6e0e8899236100a (diff)
downloadpardes-18d89dcedaed1f8437799621675e88ca47d7cdc1.tar.gz
pardes-18d89dcedaed1f8437799621675e88ca47d7cdc1.zip
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
Diffstat (limited to 'src/pardes.zig')
-rw-r--r--src/pardes.zig8
1 files changed, 8 insertions, 0 deletions
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;