summaryrefslogtreecommitdiff
path: root/core/Query.zig
diff options
context:
space:
mode:
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 ebb44155..95322cc1 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);