summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-20 15:13:18 -0300
committerGabriel Schneider <[email protected]>2026-11-20 19:20:33 -0300
commite9a641ee2c743fec2fe2505d2e11c96fa36767b8 (patch)
tree0475bbf328bf21e41b573c0cd95684d8a7336741
parent4887578ce82518c84ef76f7ee03748911f4f9933 (diff)
downloadpardes-e9a641ee2c743fec2fe2505d2e11c96fa36767b8.tar.gz
pardes-e9a641ee2c743fec2fe2505d2e11c96fa36767b8.zip
core, docs: the docking vocabulary, the family the rename of attached_to to docked_to left (P37): layout.attachFrom -> layout.dockFrom (its five callers: Query.zig x2, Store.zig, its tests), testAttachment -> testDocking, Query.zig's local attached -> docked, the section "Attached panes" -> "Docked panes" (and the three comments that name it), and "attached", "attachment(s)", "unattached", "Attach new pane", "detaches it" where a pane is docked to a pane -> "docked", "docked pane(s)", "undocked", "Dock new pane", "undocks it", through core/layout.zig (two test names with it), core/Handover.zig, core/Store.zig, core/Query.zig, comments in core/panes.zig (4) and core/builtins.zig (2), docs/next-drag.md, docs/search-proto-converge.md and docs/next-daemon.md (1); every attach of a client to a session stays, as do the search prototype's name "attached" and its setting SearchPlace attached|column (docs/search-proto-converge.md:18, :134: names of the past) and the changelog's past entries; no behaviour changes; gate on the stack through this change and the docking vocabulary (load 4-32): tui core-test 871/1028 (157 skipped), shell-test 1070/1073, pane-test 183/184, term-test 17/17, kitty-test 45/45, behaviour-test 275/275 and --replay 275/275, consumer-test passes, addon-test 5/5, process-test 0 of 144 (tty boot: msg failed once at load 32 and passed alone), replicas --clients 5 and --bytes --clients 5: diverged 0, unequal 0, deltas wrong 0, quiet checks differed 0, unlisted stops 0, corpus 22 of 22, no leak; the semantics word a73794ff9e03f814 as on merge40; daemon.py --far, --games, --window-clients pass, plain fails 2 of 4 at "client C agrees with a shell's output" (a timeout), as merge40's build does 3 of 6; the macOS library (x86_64-linux, aarch64-macos, the ABI guard 2/2) and the FreeBSD cross-build build; frames 77/77, gui unit-test 1666/1670 (the perf check's BaselineHarnessMismatch), perfab corpus2x +0.054% (noise 0.054%), the 121 per-operation counts within 0.1% against tree2 (key-down on medium 10,039,720 and render on medium 11,454,636, merge40's gate 10,039,703 and 11,454,619)
Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
-rw-r--r--core/Handover.zig14
-rw-r--r--core/Query.zig18
-rw-r--r--core/Store.zig8
-rw-r--r--core/builtins.zig4
-rw-r--r--core/layout.zig90
-rw-r--r--core/panes.zig8
-rw-r--r--docs/next-daemon.md2
-rw-r--r--docs/next-drag.md6
-rw-r--r--docs/search-proto-converge.md8
9 files changed, 79 insertions, 79 deletions
diff --git a/core/Handover.zig b/core/Handover.zig
index dde31f8b..6f7340b2 100644
--- a/core/Handover.zig
+++ b/core/Handover.zig
@@ -33,7 +33,7 @@ const MAX_PANES = pardes.MAX_PANES;
/// libc: fork and exec of a window, and file calls in the cancelable carry task that must not see its cancel (its defer's unlink).
const libc = std.c;
-/// What a grip carries out of its window: one pane with the panes attached
+/// What a grip carries out of its window: one pane with the panes docked
/// to it, or a whole column.
pub const Kind = enum { pane, column };
@@ -46,7 +46,7 @@ const Carried = struct {
/// Each pane as dump.savePane makes it, top to bottom.
panes: []const []const u8,
weights: []const f32,
- /// Which of them each one is attached to (layout.zig, "Attached panes").
+ /// Which of them each one is docked to (layout.zig, "Docked panes").
owners: []const ?u32,
};
pub const carried_magic = "pardes-carried\n";
@@ -84,8 +84,8 @@ pub fn deinit(h: *Handover, gpa: std.mem.Allocator) void {
h.bytes = null;
}
-/// Pane slot `at` (with what is attached to it, or alone when it is itself
-/// an attachment), or column `at`, released past the window's edge: dumped,
+/// Pane slot `at` (with what is docked to it, or alone when it is itself
+/// a docked pane), or column `at`, released past the window's edge: dumped,
/// and the host asked to carry it. Only text panes travel: a terminal's
/// shell is this process's child and would die with the pane here.
pub fn begin(h: *Handover, p: *Pardes, carried: Kind, at: usize) void {
@@ -273,7 +273,7 @@ pub fn adopt(p: *Pardes, bytes: []const u8) !usize {
n += 1;
if (pane.file == null) return error.NotText;
}
- // An attachment names its owner by its place in the dump.
+ // A docked pane names its owner by its place in the dump.
for (st.owners, 0..) |owner, k| {
const at = owner orelse continue;
if (at >= n) continue;
@@ -299,7 +299,7 @@ pub fn adopt(p: *Pardes, bytes: []const u8) !usize {
for (0..p.view().ncol) |c| for (p.view().cols[c].panes[0..p.view().cols[c].n]) |id| {
heights[id] = p.view().rects[id].h;
};
- // The group under the pointer (a pane with what is attached to it): the
+ // The group under the pointer (a pane with what is docked to it): the
// new panes go under all of it, out of its owner's rows.
var after: usize = p.view().cols[tc].n;
var root: ?usize = null;
@@ -315,7 +315,7 @@ pub fn adopt(p: *Pardes, bytes: []const u8) !usize {
}
if (root) |owner| {
const r = p.view().rects[owner];
- // Down to the pointer's row; let go over one of its attachments,
+ // Down to the pointer's row; let go over one of its docked panes,
// half of it.
const keeps = @max(layout.minRows(p, owner), if (y >= r.y and y < r.y + r.h) (y - r.y) + 1 else r.h / 2);
const give = heights[owner] -| keeps;
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);
diff --git a/core/Store.zig b/core/Store.zig
index 82e3c5bf..ac9387cb 100644
--- a/core/Store.zig
+++ b/core/Store.zig
@@ -28,7 +28,7 @@ pub const Closed = struct {
/// brought back, it takes them from that pane alone.
gainer: u32,
below: bool,
- /// The pane it was attached to, by serial (0 none).
+ /// The pane it was docked to, by serial (0 none).
owner: u32,
rows: u16,
/// What its Panes row shows: its file, command or directory.
@@ -78,7 +78,7 @@ pub fn clone(s: *const Store, gpa: std.mem.Allocator) Store {
// ---- the closed panes ----
/// Pane `id`, about to close, kept: what it was (a one-pane Dump) and
-/// where (its column, its rows, what it was attached to). Null for a pane
+/// where (its column, its rows, what it was docked to). Null for a pane
/// that is no pane of the user's: a query pane, a preview, one carried to
/// another window (`away`), one made and refused in the same step (never
/// announced), or one whose dump fails or is too big. `close` finishes it
@@ -186,7 +186,7 @@ pub fn closedBySerial(s: *const Store, serial: u32) ?*Closed {
}
/// Closed pane `serial` of this session made again, where it was: beside
-/// the pane its rows went to, taking them from that pane alone (attached
+/// the pane its rows went to, taking them from that pane alone (docked
/// again to its owner when that is still open), else placed as a new pane
/// from `from`. False when it is not this session's, or its dump will not
/// load; the keyboard on it otherwise.
@@ -204,7 +204,7 @@ pub fn reopen(s: *Store, p: *Pardes, serial: u32, from: usize) bool {
const owner = if (place.owner != 0) p.paneBySerial(place.owner) else null;
const gainer = if (place.gainer != 0) p.paneBySerial(place.gainer) else null;
const placed = if (owner) |o|
- layout.attachFrom(p, o, free, place.rows, o)
+ layout.dockFrom(p, o, free, place.rows, o)
else if (gainer) |g|
layout.giveBack(p, free, g, place.below, place.rows)
else
diff --git a/core/builtins.zig b/core/builtins.zig
index 894478fd..7ad70e7c 100644
--- a/core/builtins.zig
+++ b/core/builtins.zig
@@ -1017,11 +1017,11 @@ pub const Del = struct {
// acme's Del asks winclean first (exec.c del): unsaved text is warned
// about once, and the same Del again, nothing edited since, closes.
if (warnModifiedIn(c, .Del, .{ .pane = c.id })) return;
- // An attachment's rows go back to its owner: nothing to ask.
+ // A docked pane's rows go back to its owner: nothing to ask.
if (layout.ownerOf(c.p, c.id)) |owner| return c.p.removePane(c.id, owner) catch |err| c.p.reportError(.at(c.id), "close", err);
const at = layout.findPane(c.p, c.id);
const above = if (at) |f| layout.expandedNeighbor(c.p, f.col, f.idx, .above) else null;
- // An owner's attachments close with it: below is past them.
+ // An owner's docked panes close with it: below is past them.
const below = if (at) |f| layout.expandedNeighbor(c.p, f.col, layout.groupEnd(c.p, f.col, f.idx) - 1, .below) else null;
const to: ?usize = if (std.mem.eql(u8, side, "k"))
above orelse below
diff --git a/core/layout.zig b/core/layout.zig
index 9c99dc7d..4c7d6afb 100644
--- a/core/layout.zig
+++ b/core/layout.zig
@@ -249,8 +249,8 @@ fn splitRowFor(y: u16, h: u16, cur_y: u16, least: ?u16) ?u16 {
}
/// Where pane `id` dragged by its grip to (`cur_x`, `cur_y`) lands. An
-/// owner's grip drags its group; an attachment's drags it alone, which
-/// within its group resizes it and anywhere else detaches it (movePane).
+/// owner's grip drags its group; a docked pane's drags it alone, which
+/// within its group resizes it and anywhere else undocks it (movePane).
/// Another group is one place: a pane dropped on it lands under all of it.
pub fn movePlacement(p: *Pardes, id: usize, cur_x: u16, cur_y: u16) ?MovePlacement {
const v = p.view();
@@ -285,8 +285,8 @@ pub fn movePlacement(p: *Pardes, id: usize, cur_x: u16, cur_y: u16) ?MovePlaceme
k += 1;
continue;
}
- // Its own group's panes are places of their own: that is how an
- // attachment's grip resizes it against its owner.
+ // Its own group's panes are places of their own: that is how a
+ // docked pane's grip resizes it against its owner.
const unit_end = if (groupRoot(p, v.cols[tc].panes[k]) == own_root) k + 1 else groupEnd(p, tc, k);
var h: u16 = 0;
for (k..unit_end) |j| {
@@ -313,8 +313,8 @@ pub fn movePlacement(p: *Pardes, id: usize, cur_x: u16, cur_y: u16) ?MovePlaceme
return last;
}
-/// Move pane `id`, and the group it owns, where movePlacement says. An
-/// attachment moved anywhere but within its own group is detached there.
+/// Move pane `id`, and the group it owns, where movePlacement says. A
+/// docked pane moved anywhere but within its own group is undocked there.
pub fn movePane(p: *Pardes, id: usize, cur_x: u16, cur_y: u16) void {
const v = p.view();
const placement = movePlacement(p, id, cur_x, cur_y) orelse return;
@@ -549,7 +549,7 @@ pub fn acmePlace(p: *Pardes, c: usize, origin: ?usize, id: usize) void {
var empty: ?usize = null;
for (p.view().cols[c].panes[0..n]) |k| {
const pane = p.panes[k] orelse continue;
- // An attachment is its owner's: never halved for another pane.
+ // A docked pane is its owner's: never halved for another pane.
if (pane.collapsed or ownerOf(p, k) != null) continue;
// `>=`: at a tie the one nearer the bottom, as acme picks.
if (big == null or bodyRows(p, k) >= bodyRows(p, big.?)) big = k;
@@ -1076,7 +1076,7 @@ pub fn absorbVWeight(p: *Pardes, id: usize, to: ?usize) ?usize {
var k = f.idx;
while (to == null and k > 0) : (k -= 1) {
sib = v.cols[f.col].panes[k - 1];
- // nor to a pane attached to another: rows go to owners
+ // nor to a pane docked to another: rows go to owners
if (p.panes[sib]) |pp| if (if (pp.file) |ff| panes.Output.fileTraits(ff.output).doc else true) if (ownerOf(p, sib) == null) break;
}
const s = p.panes[sib] orelse return null;
@@ -1112,26 +1112,26 @@ pub fn splitBelow(p: *Pardes, src_id: usize, nw: *Pane) void {
};
}
-// ---- Attached panes ----
+// ---- Docked panes ----
//
-// A results pane (+Search, +Callstack, +Diff, +Errors) is ATTACHED to the
+// A results pane (+Search, +Callstack, +Diff, +Errors) is DOCKED to the
// pane it answers for, its owner (Pane.docked_to). The owner and what is
-// attached to it, and what is attached to those (a preview under a
+// docked to it, and what is docked to those (a preview under a
// +Search), are a GROUP: contiguous in one column, the owner first. A group
// is one place to everything else in the layout: an unrelated pane is never
// put inside it (acmePlace, splitAt, splitTallest), a pane dragged onto it
// lands under all of it (movePlacement), and its owner's grip, Collapse and
-// Del take all of it (movePane, toggleCollapse, Pardes.removePane). An
-// attachment's rows come from its owner and go back to it, nobody else's.
+// Del take all of it (movePane, toggleCollapse, Pardes.removePane). A
+// docked pane's rows come from its owner and go back to it, nobody else's.
-/// The slot of `id`'s owner, when `id` is attached to a live pane.
+/// The slot of `id`'s owner, when `id` is docked to a live pane.
pub fn ownerOf(p: *const Pardes, id: usize) ?usize {
const serial = (p.panes[id] orelse return null).docked_to orelse return null;
for (p.panes, 0..) |slot, i| if (slot) |pane| if (pane.serial == serial and i != id) return i;
return null;
}
-/// The owner at the top of `id`'s group: `id` itself when it is attached to
+/// The owner at the top of `id`'s group: `id` itself when it is docked to
/// nothing. Bounded: a dump could name a ring of owners.
pub fn groupRoot(p: *const Pardes, id: usize) usize {
var at = id;
@@ -1139,7 +1139,7 @@ pub fn groupRoot(p: *const Pardes, id: usize) usize {
return at;
}
-/// Whether `id` is `root` or attached to it through any number of owners.
+/// Whether `id` is `root` or docked to it through any number of owners.
fn descends(p: *const Pardes, id: usize, root: usize) bool {
var at = id;
for (0..MAX_PANES) |_| {
@@ -1150,7 +1150,7 @@ fn descends(p: *const Pardes, id: usize, root: usize) bool {
}
/// One past the last pane of the group that pane `idx` of column `c` is
-/// in: `idx + 1` for a pane with nothing attached.
+/// in: `idx + 1` for a pane with nothing docked.
pub fn groupEnd(p: *const Pardes, c: usize, idx: usize) usize {
const v = p.view();
const root = groupRoot(p, v.cols[c].panes[idx]);
@@ -1159,11 +1159,11 @@ pub fn groupEnd(p: *const Pardes, c: usize, idx: usize) usize {
return k;
}
-/// The attachments kept where they are attached: one whose owner is gone,
+/// The docked panes kept where they are docked: one whose owner is gone,
/// or that something (a 9P move, a pane split into a column of its own, an
/// owner moved by a route that does not carry its group) left anywhere but
/// right under its owner's group, is an ordinary pane from then on, where
-/// it stands. Nothing moves. Top to bottom, so a nested attachment is
+/// it stands. Nothing moves. Top to bottom, so a nested docked pane is
/// judged after the one it hangs from.
pub fn keepGroups(p: *Pardes) void {
for (0..p.view().ncol) |c| for (p.view().cols[c].panes[0..p.view().cols[c].n], 0..) |id, k| {
@@ -1175,17 +1175,17 @@ pub fn keepGroups(p: *Pardes) void {
};
}
-/// Attach new pane `id`, in no column yet, to `owner`: under the owner's
+/// Dock new pane `id`, in no column yet, to `owner`: under the owner's
/// group, `rows` of the owner's rows (tag included), from the owner and
/// from no other pane. The owner keeps its own minimum, else its tag (acme
-/// lets a window shrink to it), so the attachment may get fewer. A folded
-/// owner is unfolded first. The rows are the attachment's from then on:
+/// lets a window shrink to it), so the docked pane may get fewer. A folded
+/// owner is unfolded first. The rows are the docked pane's from then on:
/// nothing here ever resizes it again; the seam is the user's to drag.
/// False, `id` in no column, when the owner has not the rows for its tag
-/// and the attachment's minimum. The rows are given by `giver`: the owner
+/// and the docked pane's minimum. The rows are given by `giver`: the owner
/// itself or a pane of its group (a +Preview added under a query pane later
/// takes the text's rows, so the query pane, typed into, keeps its own).
-pub fn attachFrom(p: *Pardes, owner: usize, id: usize, rows: u16, giver: usize) bool {
+pub fn dockFrom(p: *Pardes, owner: usize, id: usize, rows: u16, giver: usize) bool {
const v = p.view();
const o = p.panes[owner] orelse return false;
const g = p.panes[giver] orelse return false;
@@ -1238,10 +1238,10 @@ pub fn giveBack(p: *Pardes, id: usize, gainer: usize, below: bool, rows: u16) bo
return true;
}
-/// Collapse on an owner with attachments: the whole group folds to its
+/// Collapse on an owner with docked panes: the whole group folds to its
/// tags, every row it gave up to the one unfolded neighbour outside it,
/// and unfolds again from that neighbour, as one pane's Collapse does.
-/// ponytail: unfolding opens every attachment, one folded alone before
+/// ponytail: unfolding opens every docked pane, one folded alone before
/// included; remembering which were is a bit a pane.
fn collapseGroup(p: *Pardes, c: usize, start: usize, end: usize) void {
const v = p.view();
@@ -1281,7 +1281,7 @@ pub fn toggleCollapse(p: *Pardes, id: usize) void {
const pane = p.panes[id] orelse return;
const at = findPane(p, id) orelse return;
compute(p);
- // An owner folds and unfolds with what is attached to it.
+ // An owner folds and unfolds with what is docked to it.
if (ownerOf(p, id) == null) {
const end = groupEnd(p, at.col, at.idx);
if (end > at.idx + 1) return collapseGroup(p, at.col, at.idx, end);
@@ -1635,8 +1635,8 @@ pub fn reprojectTagHit(p: *const Pardes, tag_hit: TagHit) ?TagHit {
return Layer.tagAgain(tag_hit);
}
-/// A test's attachment: an empty +Search in a new slot, in no column.
-fn testAttachment(p: *Pardes) !usize {
+/// A test's docked pane: an empty +Search in a new slot, in no column.
+fn testDocking(p: *Pardes) !usize {
const free = p.freeSlot().?;
_ = try panes.Output.open(p, free, "/tmp", .search, "", try p.gpa.dupe(u8, "q\n"));
return free;
@@ -1884,7 +1884,7 @@ test "column reorder moves only crossed state and preserves weights" {
try std.testing.expectEqual(@as(i32, 21), p.view().col_tags[1].cur_col);
}
-test "an attachment takes its rows from its owner alone, keeps them, and moves, folds and closes with it" {
+test "a docked pane takes its rows from its owner alone, keeps them, and moves, folds and closes with it" {
const exec = pardes.exec;
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 160, .rows = 48 });
defer p.deinit();
@@ -1900,8 +1900,8 @@ test "an attachment takes its rows from its owner alone, keeps them, and moves,
const unrelated = [_]usize{ below, other_col };
// Under its owner, the rows asked for, the owner's and nobody else's.
- const s = try testAttachment(p);
- try std.testing.expect(attachFrom(p, 0, s, 9, 0));
+ const s = try testDocking(p);
+ try std.testing.expect(dockFrom(p, 0, s, 9, 0));
try std.testing.expectEqual(@as(?usize, 0), ownerOf(p, s));
try std.testing.expectEqual(s, p.view().cols[0].panes[1]);
for (unrelated) |k| try std.testing.expectEqualDeep(before[k], p.view().rects[k]);
@@ -1909,8 +1909,8 @@ test "an attachment takes its rows from its owner alone, keeps them, and moves,
try std.testing.expectEqual(before[0].y, p.view().rects[0].y);
try std.testing.expectEqual(@as(u16, 9), p.view().rects[s].h);
// A second level (a preview under a query pane): out of the first's rows.
- const pv = try testAttachment(p);
- try std.testing.expect(attachFrom(p, s, pv, 4, s));
+ const pv = try testDocking(p);
+ try std.testing.expect(dockFrom(p, s, pv, 4, s));
try std.testing.expectEqual(pv, p.view().cols[0].panes[2]);
try std.testing.expectEqual(@as(usize, 0), groupRoot(p, pv));
try std.testing.expectEqual(@as(usize, 3), groupEnd(p, 0, 0));
@@ -1925,7 +1925,7 @@ test "an attachment takes its rows from its owner alone, keeps them, and moves,
compute(p);
try std.testing.expectEqual(@as(u16, 5), p.view().rects[s].h);
- // An unrelated New, from the owner or from its attachment, never lands
+ // An unrelated New, from the owner or from its docked pane, never lands
// inside the group.
exec.runBuiltin(p, .New, 0, "", null);
exec.runBuiltin(p, .New, s, "", null);
@@ -1933,7 +1933,7 @@ test "an attachment takes its rows from its owner alone, keeps them, and moves,
try std.testing.expectEqual(s, p.view().cols[at.col].panes[at.idx + 1]);
try std.testing.expectEqual(pv, p.view().cols[at.col].panes[at.idx + 2]);
- // The seam between owner and attachment is the user's: the pair alone.
+ // The seam between owner and docked pane is the user's: the pair alone.
compute(p);
const pre_drag = p.view().rects;
applyRowSplit(p, at.col, at.idx, p.view().rects[s].y - 3);
@@ -1965,7 +1965,7 @@ test "an attachment takes its rows from its owner alone, keeps them, and moves,
try std.testing.expect(p.panes[pv] == null);
compute(p);
try std.testing.expectEqual(pair[s].h + pair[pv].h, p.view().rects[s].h);
- // Del of the attachment gives its rows back to the owner, nobody else.
+ // Del of the docked pane gives its rows back to the owner, nobody else.
pair = p.view().rects;
exec.runBuiltin(p, .Del, s, "", null);
try std.testing.expect(p.panes[s] == null);
@@ -1973,19 +1973,19 @@ test "an attachment takes its rows from its owner alone, keeps them, and moves,
try std.testing.expectEqual(pair[0].h + pair[s].h, p.view().rects[0].h);
for (p.view().cols[1].panes[0..p.view().cols[1].n]) |k| if (k != 0) try std.testing.expectEqualDeep(pair[k], p.view().rects[k]);
- // Del of the owner closes what is attached to it.
- const again = try testAttachment(p);
- try std.testing.expect(attachFrom(p, 0, again, 6, 0));
+ // Del of the owner closes what is docked to it.
+ const again = try testDocking(p);
+ try std.testing.expect(dockFrom(p, 0, again, 6, 0));
exec.runBuiltin(p, .Del, 0, "", null);
try std.testing.expect(p.panes[0] == null and p.panes[again] == null);
}
-test "an attachment survives Dump and Restore, and one left away from its owner is a pane of its own" {
+test "a docked pane survives Dump and Restore, and one left away from its owner is a pane of its own" {
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 100, .rows = 40 });
defer p.deinit();
_ = try p.setTestFile("alpha\nbeta\nalphabet\n");
- const s = try testAttachment(p);
- try std.testing.expect(attachFrom(p, 0, s, 8, 0));
+ const s = try testDocking(p);
+ try std.testing.expect(dockFrom(p, 0, s, 8, 0));
try std.testing.expectEqual(@as(?usize, 0), ownerOf(p, s));
try dump.dumpState(p);
const restored = try dump.initFromDump(std.testing.allocator, .{ .tty_only = true, .cols = 100, .rows = 40 }, p.dump_out.?);
@@ -1995,8 +1995,8 @@ test "an attachment survives Dump and Restore, and one left away from its owner
pardes.exec.runBuiltin(p, .Undock, s, "", null);
try std.testing.expect(p.panes[s].?.docked_to == null);
// Put above its owner by a route that does not carry groups: detached.
- const t = try testAttachment(p);
- try std.testing.expect(attachFrom(p, 0, t, 8, 0));
+ const t = try testDocking(p);
+ try std.testing.expect(dockFrom(p, 0, t, 8, 0));
try std.testing.expectEqual(@as(?usize, 0), ownerOf(p, t));
removePane(p, t);
insert(p, 0, 0, t);
diff --git a/core/panes.zig b/core/panes.zig
index 68304437..174af241 100644
--- a/core/panes.zig
+++ b/core/panes.zig
@@ -147,10 +147,10 @@ pub const Pane = struct {
vweight: f32 = 1,
/// A folded pane keeps its expansion weight, but occupies only its tag row.
collapsed: bool = false,
- /// The serial of the pane this one is attached to, its owner: a query
+ /// The serial of the pane this one is docked to, its owner: a query
/// pane or its +Preview sits right under its owner in the owner's
/// column, takes its rows from the owner alone, and moves, folds and
- /// closes with it (layout.zig, "Attached panes"). An owner that is
+ /// closes with it (layout.zig, "Docked panes"). An owner that is
/// gone, or a pane no longer right under its owner's group, leaves it
/// an ordinary pane (layout.keepGroups).
docked_to: ?u32 = null,
@@ -1476,14 +1476,14 @@ pub fn paneDir(pane: *const Pane) []const u8 {
pub fn removePane(p: *Pardes, id: usize, to: ?usize) error{OutOfMemory}!void {
const v = p.view();
const pane = p.panes[id] orelse return;
- // What is attached to it closes with it, first, each giving its rows
+ // What is docked to it closes with it, first, each giving its rows
// back to it: then its rows, theirs among them, go where a pane's go.
for (0..p.panes.len) |k| if (p.panes[k]) |other| if (k != id and other.docked_to == pane.serial) {
if (layout.ownerOf(p, k) != id) continue;
try p.removePane(k, id);
layout.compute(p);
};
- // An attachment's rows go back to its owner and nobody else.
+ // A docked pane's rows go back to its owner and nobody else.
const owner = layout.ownerOf(p, id);
const place = layout.findPane(p, id);
const emptied = if (place) |f| (if (v.cols[f.col].n == 1) f.col else null) else null;
diff --git a/docs/next-daemon.md b/docs/next-daemon.md
index 538729e6..9ed25f9c 100644
--- a/docs/next-daemon.md
+++ b/docs/next-daemon.md
@@ -1444,7 +1444,7 @@ dump hooks; `pardes-snap --dump`, `pardes-monkey --dump`, and both in
Handover's dump in flight and its carrier, and the host's fallback file
table are authority: host errands, not state.
- **Restore keeps serials.** Renumbering would rewrite every serial the
- session holds (attachments, query owners, places, messages, LSP and
+ session holds (docked panes, query owners, places, messages, LSP and
callstack requests); Restore hangs up every connection anyway. The next
serials are past the old session's; `restored`/`restoredcol` records
are gone. A Restore over an older session keeps the host's facts (cell
diff --git a/docs/next-drag.md b/docs/next-drag.md
index 47ccdb0b..dd2f24ed 100644
--- a/docs/next-drag.md
+++ b/docs/next-drag.md
@@ -43,7 +43,7 @@ window it goes to is found by asking every registry session.
grip) released outside goes to `Handover.begin` instead of the layout
move. Inside the window the grip drag is exactly as before.
- `core/Handover.zig` (`Pardes.handover`), the core half: the pane with the
- panes attached to it (an attachment dragged alone goes alone, unattached),
+ panes docked to it (a docked pane dragged alone goes alone, undocked),
or the column, is dumped alone: `dump.dumpBytes(p, keep, carried)`, which
`dumpState` now calls with no mask; `State.carried` (`pane`/`column`)
marks such a dump. Each carried pane's serial and `File.revision` is
@@ -61,7 +61,7 @@ window it goes to is found by asking every registry session.
- `Handover.finish`: taken, each carried pane is closed with
`Pardes.removePane` (Del's rows rule: its rows go to its neighbour; a
carried column's empty column is dropped); a pane whose revision changed
- since the dump is kept, unattached ("copied to …; edited on the way, kept
+ since the dump is kept, undocked ("copied to …; edited on the way, kept
here too"). Refused or failed: everything stays, the reason on the
message row. One handover flies at a time.
- New option `--geometry=WxH[+X+Y]` (runtime/main.zig, `Options.geometry`).
@@ -80,7 +80,7 @@ window it goes to is found by asking every registry session.
dumped panes into free slots and places them where the pointer is: a
pane goes right under the group the pointer is over, out of that group
owner's rows alone (the owner keeps its rows down to the pointer's row;
- over one of its attachments, half); a column goes beside the column the
+ over one of its docked panes, half); a column goes beside the column the
pointer is over, out of that column's width alone (`insertColumn`). Every
other pane's rect is unchanged (tested). The ctl write is answered after
the panes are in, so the source closes its pane only once the target has
diff --git a/docs/search-proto-converge.md b/docs/search-proto-converge.md
index da336f7c..3af49a06 100644
--- a/docs/search-proto-converge.md
+++ b/docs/search-proto-converge.md
@@ -2,11 +2,11 @@
The design the twelve prototypes added up to (CONVERGE.md), built as the
product in six changes. One pane kind does all searching: the **query
-pane**, a `+Search` attached under the pane that asked (its *owner*), whose
+pane**, a `+Search` docked under the pane that asked (its *owner*), whose
body's line 1 is the query, typed into, and whose rows below are made live
from a source. The owner shows the set in its own text (its **places**:
tints, rail ticks, the current one selected), and a row that points at a
-file no pane shows is shown in a **+Preview** attached under the query
+file no pane shows is shown in a **+Preview** docked under the query
pane. Everything on screen is text in a pane: B1/B2/B3 and the chords work
on all of it, nothing is drawn over anything, and the notice band keeps
only the prompts that are not search.
@@ -15,7 +15,7 @@ only the prompts that are not search.
| piece | file | lifted from |
|---|---|---|
-| attached panes: a group under its owner, rows from the owner alone, moving/folding/closing with it, seam drag, Dump/Restore, `Undock` | `core/layout.zig` "Attached panes", `Pane.docked_to` | attached |
+| docked panes: a group under its owner, rows from the owner alone, moving/folding/closing with it, seam drag, Dump/Restore, `Undock` | `core/layout.zig` "Docked panes", `Pane.docked_to` | attached |
| places: every match tinted, rail ticks (B1 on a tick goes there), current selected and in view, smart-case regex, view-first sliced scan, silent wrap | `core/Places.zig`, `Pane.places` | incsearch (MatchSet) |
| the query pane: line 1, its first word the source, live rows, preview, Enter/Esc/Del, reuse, settings | `core/Query.zig`, `Pane.query` | queryline, pick, live, preview, everywhere |
| fuzzy names (files, recent, panes, declarations) | `core/Names.zig` | pick (its scorer, whole) |
@@ -113,7 +113,7 @@ tint (`Query.paintMark`), no selection: a click, a sweep or a chord never
erases it and B2 / B3 on it take the word clicked, as on any row.
**Enter** puts the keyboard on the current hit in its pane (the +Preview
-promoted in place: same slot, serial, rect, an unattached file pane from
+promoted in place: same slot, serial, rect, an undocked file pane from
then on), fills `/`, and freezes the rows into ordinary text (tag ` Save
Undock Del`). A `/` freezes its whole list (every place found first, 2000
rows at most), a Grep every line it has. **Esc** while typing puts every