summaryrefslogtreecommitdiff
path: root/core/Query.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-20 19:22:32 -0300
committerGabriel Schneider <[email protected]>2026-11-20 19:51:13 -0300
commit4e1432049765be6e793a3834c93c4cd5318e82bc (patch)
treeaa8e98c4cb2b7ee6ba33a49255fa85cab0089e2d /core/Query.zig
parent486f347adeed5bac6aaabe8be34e6a69bf323a62 (diff)
parent2d75490196a9d15eff6ac471e9584101a5697afe (diff)
downloadpardes-4e1432049765be6e793a3834c93c4cd5318e82bc.tar.gz
pardes-4e1432049765be6e793a3834c93c4cd5318e82bc.zip
integration: six slot fields typed, the docking vocabulary, the Mac's callbacks and consumer-test, on six small faults: pardes-slots (Pipe.PendingPipe.pane, Ask.wait.pane, theme_file_pane, ThemeFileRequest.pane as Pane.Id; Authority.view_of and Peer.view as View.Id; layout.dockFrom and the prose; macos State.callbacks; the build step consumer-test) and pardes-merge42; one conflict, in Peers.detach, where the pair's lifetime rule (daemon.keepSession) and the view's type (peer.view.index()) met on neighbouring lines: both kept; tui core-test 874/1031 (157 skipped), shell-test 1073/1076, term-test 17/17, both soaks diverged 0, unequal 0, unlisted 0, the window builds; this line carries the client's heap corruption that came with pardes-merge40 (a fix is being made): not gated further until it has it
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.zig18
1 files changed, 9 insertions, 9 deletions
diff --git a/core/Query.zig b/core/Query.zig
index 663095b0..3a5aa5f8 100644
--- a/core/Query.zig
+++ b/core/Query.zig
@@ -1,5 +1,5 @@
-//! The query pane: the one pane search is. A +Search attached under the
-//! pane that asked (its owner, layout.zig "Attached panes"), born at a
+//! The query pane: the one pane search is. A +Search docked under the
+//! pane that asked (its owner, layout.zig "Docked panes"), born at a
//! fixed height, whose body's line 1 is the query, editable text, and
//! whose rows below are made live from a source, read-only while live.
//! Line 1's first word names the source: `/pat` the owner's text (smart-
@@ -18,7 +18,7 @@
//! text: B3 on one looks, B2 on line 1 runs it again. Wherever a row points into
//! an open pane's text, that pane's places (Places.zig) show the set:
//! tints, rail ticks, the current one selected. A row pointing at a file
-//! no pane shows is shown in the +Preview attached under this pane; Enter
+//! no pane shows is shown in the +Preview docked under this pane; Enter
//! promotes the preview to the file's pane where it stands.
//!
//! Nothing moves while you type: the pane never closes, resizes or
@@ -319,7 +319,7 @@ fn create(p: *Pardes, owner_id: usize, line: []const u8, source: Source) ?usize
preview_rows = spare -| want;
}
}
- if (!layout.attachFrom(p, owner_id, free, want, owner_id)) {
+ if (!layout.dockFrom(p, owner_id, free, want, owner_id)) {
// An owner too short to give a query pane its rows: placed as any
// new pane is, the one place a search moves another pane.
layout.placeNew(p, owner_id, owner_id, free, .doc);
@@ -1635,7 +1635,7 @@ fn makePreview(p: *Pardes, qid: usize, rows: u16, giver: usize) ?usize {
return null;
};
layout.compute(p);
- if (!layout.attachFrom(p, qid, free, rows, giver)) {
+ if (!layout.dockFrom(p, qid, free, rows, giver)) {
p.removePane(free, qid) catch |err| p.reportError(.at(qid), "query", err);
return null;
}
@@ -1723,7 +1723,7 @@ fn displayPreview(p: *Pardes, qid: usize, path: []const u8, at: look.Spot) void
/// The +Preview becomes the file's pane where it stands: same slot, same
/// serial, same rect, its scroll and selection as the preview left them.
/// It is a file pane from here: an empty undo history, the Recent entry,
-/// the watch, a file's tag; and a pane of its own, no longer attached (it
+/// the watch, a file's tag; and a pane of its own, no longer docked (it
/// stays when its query pane goes).
fn promote(p: *Pardes, qid: usize, id: usize) void {
const pane = p.panes[id] orelse return;
@@ -1902,10 +1902,10 @@ pub fn cancel(p: *Pardes, id: usize) void {
if (owner_id) |oid| p.view().active = oid;
return;
}
- // Attached, its rows go back to its owner; else to its own column's.
- const attached = layout.ownerOf(p, id) != null;
+ // Docked, its rows go back to its owner; else to its own column's.
+ const docked = layout.ownerOf(p, id) != null;
if (owner_id) |oid| {
- p.removePane(id, if (attached) oid else null) catch |err| p.reportError(.at(id), "query", err);
+ p.removePane(id, if (docked) oid else null) catch |err| p.reportError(.at(id), "query", err);
p.view().active = oid;
if (layout.findPane(p, oid)) |at| p.setActiveColumn(at.col);
} else p.removePane(id, null) catch |err| p.reportError(.at(id), "query", err);