summaryrefslogtreecommitdiff
path: root/src/views.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/views.zig')
-rw-r--r--src/views.zig15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/views.zig b/src/views.zig
index f54e9eb2..46959783 100644
--- a/src/views.zig
+++ b/src/views.zig
@@ -33,8 +33,7 @@ pub const max = 4;
/// what drawing it keeps (its frame and its timings).
pub const fields = [_][:0]const u8{
"screen_w", "screen_h", "cell_pixels", "row_metrics",
- "ncol", "col_weight", "col_panes", "col_n",
- "col_tags", "col_serial", "finder", "rects",
+ "ncol", "cols", "col_tags", "finder", "rects",
"col_x", "col_w", "active",
"jumps", "njumps", "jcur", "jump_force",
"active_column",
@@ -367,17 +366,17 @@ fn unpark(p: *Pardes, k: u8) void {
// now) leave its layout, and its keyboard leaves them.
for (0..p.ncol) |c| {
var n: usize = 0;
- for (p.col_panes[c][0..p.col_n[c]]) |id| {
+ for (p.cols[c].panes[0..p.cols[c].n]) |id| {
const pane = p.panes[id] orelse continue;
if (pane.serial != slot.serials[id]) continue;
- p.col_panes[c][n] = id;
+ p.cols[c].panes[n] = id;
n += 1;
}
- p.col_n[c] = n;
+ p.cols[c].n = n;
}
if (layout.findPane(p, p.active) == null) {
- for (0..p.ncol) |c| if (p.col_n[c] > 0) {
- p.active = p.col_panes[c][0];
+ for (0..p.ncol) |c| if (p.cols[c].n > 0) {
+ p.active = p.cols[c].panes[0];
break;
};
}
@@ -450,7 +449,7 @@ pub fn open(p: *Pardes) ?u8 {
/// How a view is laid out and focused: what a new one takes of the live
/// one (`open`), and what one going leaves the view that stays (`closeKeeping`).
-const laid_out = .{ "ncol", "col_weight", "col_panes", "col_n", "col_serial", "finder", "active", "active_column", "jumps", "njumps", "jcur" };
+const laid_out = .{ "ncol", "cols", "finder", "active", "active_column", "jumps", "njumps", "jcur" };
const sized = .{ "screen_w", "screen_h", "cell_pixels", "row_metrics" };
/// View `k` gone, and the view that stays live laid out as `k` was: its