diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-05 20:39:55 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-05 22:07:27 -0300 |
| commit | 50914b0e04ac0129b11bff0f0007d5cedbfc7f8d (patch) | |
| tree | fdb18c730b1b5908c8e4048dec6606ca730890c2 /test/panes.zig | |
| parent | ce4ac94f7887025afabad92402e5f04a276da9a4 (diff) | |
| download | pardes-50914b0e04ac0129b11bff0f0007d5cedbfc7f8d.tar.gz pardes-50914b0e04ac0129b11bff0f0007d5cedbfc7f8d.zip | |
fields #37, a column is one Column: the four parallel arrays a column's own state was kept in (col_panes, col_n, col_weight, col_serial) are the session's cols: [MAX_COLS]Column, a struct of panes, n, weight and serial (acme's Column, cols.c), so a column shifted, saved or reset is one assignment where it was four (layout.reorderColumn, dropColumn, insertColumn, firstColumn, joinFits, Finder.open; joinFits and the resets now give back a column's panes beyond its count too, which nothing reads); its tag stays the session's col_tags, as a view opened takes the live one's columns but tags of its own (views.open), and col_x and col_w stay with the rects, worked out each sync; the uses in 20 files read p.cols[c].n for p.col_n[c] and so on, tests that compared the arrays whole compare the columns whole (or their weights, layout.zig's weightsOf); views.zig's per-view fields name cols; a dump written before this change loads its columns as the default once: an Upgrade or Restore from it comes back with its columns empty and its panes in none of them, and the wire's semantics change (the digest walks cols); dump.zig and Handover.zig, the persistence agent's, are edited only where they name these fields; gates on tui: core-test 960/960, behaviour-test 238/238, pane-test 171/172 (1 skipped), snap all 108 scripts ok; gui unit-test 1518/1519 (1 skipped)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'test/panes.zig')
| -rw-r--r-- | test/panes.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/panes.zig b/test/panes.zig index 27598334..a0354ba4 100644 --- a/test/panes.zig +++ b/test/panes.zig @@ -3796,7 +3796,7 @@ test "a terminal keeps its tag and two body rows through a squeeze, a drag and a const floor = p.panes[term].?.tag_rows + layout.min_body_rows; // Squeezed by the weights: the others give it its floor. p.panes[term].?.vweight = 0.01; - for (p.col_panes[col][0..p.col_n[col]]) |k| if (k != term) { + for (p.cols[col].panes[0..p.cols[col].n]) |k| if (k != term) { p.panes[k].?.vweight = 1000; }; p.sync(); @@ -3809,11 +3809,11 @@ test "a terminal keeps its tag and two body rows through a squeeze, a drag and a // A drag of the grip under it up to its tag stops at the floor; one // the other way takes a text pane down to its tag alone. const k = layout.findPane(p, term).?.idx; - if (k + 1 < p.col_n[col]) { + if (k + 1 < p.cols[col].n) { layout.applyRowSplit(p, col, k, p.rects[term].y); p.sync(); try std.testing.expectEqual(floor, p.rects[term].h); - const text = p.col_panes[col][k + 1]; + const text = p.cols[col].panes[k + 1]; layout.applyRowSplit(p, col, k, p.screen_h); p.sync(); try std.testing.expect(p.rects[text].h <= p.panes[text].?.tag_rows); |
