summaryrefslogtreecommitdiff
path: root/core/Handover.zig
diff options
context:
space:
mode:
Diffstat (limited to 'core/Handover.zig')
-rw-r--r--core/Handover.zig14
1 files changed, 7 insertions, 7 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;