summaryrefslogtreecommitdiff
path: root/core/Query.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-19 23:51:23 -0300
committerGabriel Schneider <[email protected]>2026-11-20 00:00:00 -0300
commit8a1f65a2d374796b9b5559c4aab87c8d1e8f6e68 (patch)
tree24c4d770b8ac5a11e1f0169f9e0707fda8cde678 /core/Query.zig
parentd236dff22567c2f563756695598678afb84fbef4 (diff)
parenta310585195484b8420f14cff3e736c604f47c11e (diff)
downloadpardes-8a1f65a2d374796b9b5559c4aab87c8d1e8f6e68.tar.gz
pardes-8a1f65a2d374796b9b5559c4aab87c8d1e8f6e68.zip
integration: the ruled renames on the documents and the load-independent tests: pardes-renames (config.Settings, macos.Callbacks, core/ninep/harness.zig, Pane.docked_to and the word Undock) and pardes-merge23; one conflict, in core/CHANGELOG.md, where both sides added Unreleased entries: both kept; no old name left in the tree; tui core-test 848/991 (143 skipped), shell-test 1027/1030, the window builds
Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'core/Query.zig')
-rw-r--r--core/Query.zig16
1 files changed, 8 insertions, 8 deletions
diff --git a/core/Query.zig b/core/Query.zig
index dacc11a1..0cecb93e 100644
--- a/core/Query.zig
+++ b/core/Query.zig
@@ -200,16 +200,16 @@ fn freeSaved(gpa: std.mem.Allocator, s: Saved) void {
gpa.free(s.items);
}
-/// The owner's query pane (attached to it, or left where it was by
-/// Unattach): the one a later search from it reuses.
+/// The owner's query pane (docked to it, or left where it was by
+/// Undock): the one a later search from it reuses.
pub fn ofOwner(p: *Pardes, owner_serial: u32) ?usize {
var found: ?usize = null;
for (p.panes, 0..) |slot, i| {
const pane = slot orelse continue;
const q = pane.query orelse continue;
if (q.owner != owner_serial) continue;
- // the attached one first: an unattached one is a kept result
- if (pane.attached_to == owner_serial) return i;
+ // the docked one first: an undocked one is a kept result
+ if (pane.docked_to == owner_serial) return i;
found = found orelse i;
}
return found;
@@ -1754,7 +1754,7 @@ fn promote(p: *Pardes, qid: usize, id: usize) void {
// Its text was read from that file to preview it (displayPreview).
f.on_disk = filesystem.localPath(f.path) != null;
f.syntax_dirty = true;
- pane.attached_to = null;
+ pane.docked_to = null;
if (f.on_disk) p.recent.opened(p.recentGpa(), f.path);
if (filesystem.localPath(f.path) != null) p.emit(.{ .watch = .{ .pane = .at(id), .on = true } });
pardes.ctlfs.events.noteLog(p, .rename, pane);
@@ -1887,7 +1887,7 @@ pub fn cancel(p: *Pardes, id: usize) void {
// A preview made for the query Esc took back has no use: its rows
// go to the text whose rows they were.
if (previewOf(p, id)) |pid| {
- p.panes[pid].?.attached_to = null;
+ p.panes[pid].?.docked_to = null;
p.removePane(pid, owner_id) catch |err| p.reportError(.at(id), "query", err);
q.preview = 0;
}
@@ -2354,7 +2354,7 @@ test "Find: names fuzzy per keystroke, the group born with its +Preview, nothing
try std.testing.expectEqual(pv, p.view().active);
try std.testing.expectEqual(serial, p.panes[pv].?.serial);
try std.testing.expect(p.panes[pv].?.file.?.output == null);
- try std.testing.expect(p.panes[pv].?.attached_to == null);
+ try std.testing.expect(p.panes[pv].?.docked_to == null);
layout.compute(p);
try std.testing.expectEqualDeep(rect, p.view().rects[pv]);
try std.testing.expect(q.frozen);
@@ -2754,6 +2754,6 @@ test "a query row's address reaches every way a look arrives: an empty look writ
// the whole row written to the pane's look: the place
a.body.cur_row = 0;
const tree = @import("ninep/tree.zig");
- try std.testing.expectEqual(tree.Status.ok, @import("ninep/testing.zig").wr(p, tree.Node.of(qp.serial, .look), line).reply.status);
+ try std.testing.expectEqual(tree.Status.ok, @import("ninep/harness.zig").wr(p, tree.Node.of(qp.serial, .look), line).reply.status);
try std.testing.expectEqual(@as(i32, 3), a.body.cur_row);
}