summaryrefslogtreecommitdiff
path: root/src/Finder.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-04 23:47:23 -0300
committerGabriel Schneider <[email protected]>2026-11-05 01:00:59 -0300
commit5d39c627bc3136dca1fc6ac6593bd4e4e34d9185 (patch)
tree6b850f56bc8f1633c6ce780bee9968f197c77b01 /src/Finder.zig
parent4e01152529be72a36a1c850106d3a0f91f46091c (diff)
downloadpardes-5d39c627bc3136dca1fc6ac6593bd4e4e34d9185.tar.gz
pardes-5d39c627bc3136dca1fc6ac6593bd4e4e34d9185.zip
Names.match takes its marks' table from dp_trace itself, where every caller passed either it or null beside its marks, and is Names.zig's own; Finder.fold, whose receiver it discarded, is a plain function
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/Finder.zig')
-rw-r--r--src/Finder.zig7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Finder.zig b/src/Finder.zig
index 511dbed3..0be40c24 100644
--- a/src/Finder.zig
+++ b/src/Finder.zig
@@ -55,7 +55,7 @@ pub fn place(f: *Finder, p: *Pardes, id: usize) bool {
layout.insert(p, c, 0, id);
pane.vweight = 1;
pane.collapsed = false;
- f.fold(p, c, id);
+ fold(p, c, id);
// The oldest goes once there are too many: the bottom one, as the top
// is always the newest.
while (p.col_n[c] > max_results) {
@@ -101,8 +101,7 @@ fn open(f: *Finder, p: *Pardes) ?usize {
/// Fold every pane of finder column `c` but `top` (and what is attached
/// to it, its +Preview) to its tag.
-fn fold(f: *const Finder, p: *Pardes, c: usize, top: usize) void {
- _ = f;
+fn fold(p: *Pardes, c: usize, top: usize) void {
layout.compute(p);
for (p.col_panes[c][0..p.col_n[c]]) |k| {
const pane = p.panes[k] orelse continue;
@@ -133,7 +132,7 @@ pub fn raise(f: *Finder, p: *Pardes, id: usize) void {
for (moved[0..n]) |k| layout.removePane(p, k);
for (moved[0..n], 0..) |k, i| layout.insert(p, c, i, k);
}
- f.fold(p, c, id);
+ fold(p, c, id);
}
/// The column a pane asked for from the finder goes in (a row looked at, a