summaryrefslogtreecommitdiff
path: root/core/panes.zig
diff options
context:
space:
mode:
Diffstat (limited to 'core/panes.zig')
-rw-r--r--core/panes.zig13
1 files changed, 6 insertions, 7 deletions
diff --git a/core/panes.zig b/core/panes.zig
index 89d9f309..15e1db50 100644
--- a/core/panes.zig
+++ b/core/panes.zig
@@ -27,12 +27,11 @@ pub const EditText = struct { text: []u8, row0: i32 };
pub const Pane = struct {
/// What the replay digest leaves out (core/walk.zig): the view's geometry,
- /// made again from the rest (File.geometry); the 9P server's record of
- /// the pane's opens and readers; the other views' share of it (views.zig).
+ /// made again from the rest (File.geometry); the other views' share of
+ /// it (views.zig). (The 9P server's part of `fs` says so in its type.)
pub const replica = .{
.local = .{ "pv", "pv_known" },
.derived = .{ "wrap_line", "wrap_col", "wrap_pad", "wrap_n", "body_wrapped", "context_rows", "body_rows", "body_visible_rows", "context_row_limit", "geometry_key", "geometry_len", "notices", "pan" },
- .authority = .{"fs"},
.len = .{ .{ "msg", "msg_len" }, .{ "msg_older", "msg_older_len" }, .{ "question", "question_len" }, .{ "shell_tail", "shell_tail_len" }, .{ "sel_snap", "nsel_snap" } },
// A picture's memory is its own allocator's (a dump loaded makes
// it there).
@@ -148,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,
@@ -1485,14 +1484,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;