summaryrefslogtreecommitdiff
path: root/src/layout.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-17 02:31:20 -0300
committerGabriel Schneider <[email protected]>2026-11-17 12:15:01 -0300
commitf749eb712d990a9b03f1db372d5311e77bd32edd (patch)
treeee4d9966f1eb293054b7ed865c9d4d6eb49e432b /src/layout.zig
parent8f6621f9f70db86d56266a59b56dfb92b324b0d9 (diff)
parentb3d32656413734952bc918c2d4cfd12fede6c214 (diff)
downloadpardes-f749eb712d990a9b03f1db372d5311e77bd32edd.tar.gz
pardes-f749eb712d990a9b03f1db372d5311e77bd32edd.zip
integration: the terminal behind src/Term.zig, with the diff viewer and the plumber's first phase
A merge of term-phase0 and pardes-next. File.zig's recolorSyntax keeps the theme's grounds and names Term.Filter and Term.Span; the changelog keeps both sides' entries, the palette sentence in the place of the entry the terminal work cut down. core-test 985/985 on tui; the diff, pager and tree process cases pass, goldens unchanged. Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'src/layout.zig')
-rw-r--r--src/layout.zig14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/layout.zig b/src/layout.zig
index 73114e45..dfbea067 100644
--- a/src/layout.zig
+++ b/src/layout.zig
@@ -180,8 +180,8 @@ pub fn columnDrop(p: *const Pardes, source: usize, x: u16, grab: u16) ColumnDrop
}
/// Share out the width of columns `left` and `left + 1` so the left one is
-/// `left_width` cells, neither below MINW. A border drag and a column grip
-/// dropped inside its own place both end here.
+/// `left_width` cells, neither below MINW. A column grip dropped inside its
+/// own place ends here.
pub fn setColumnPairWidth(p: *Pardes, left: usize, left_width: u64) void {
const v = p.view();
if (left + 1 >= v.ncol) return;
@@ -2099,15 +2099,7 @@ test "repeated non-dyadic column splits preserve every unrelated boundary" {
try std.testing.expect(splitColumn(p, 0, 1, false));
p.sync();
- const handle = p.view().col_x[0] + p.view().col_w[0] - 1;
- const untouched = weightsOf(p);
- p.update(.{ .mouse = .{ .button = .left, .kind = .press, .col = handle, .row = TOPBAR_H + 1 } });
- p.update(.{ .mouse = .{ .button = .left, .kind = .release, .col = handle, .row = TOPBAR_H + 1 } });
- try std.testing.expectEqual(untouched, weightsOf(p));
-
- p.update(.{ .mouse = .{ .button = .left, .kind = .press, .col = handle, .row = TOPBAR_H + 1 } });
- p.update(.{ .mouse = .{ .button = .left, .kind = .drag, .col = 417, .row = TOPBAR_H + 1 } });
- p.update(.{ .mouse = .{ .button = .left, .kind = .release, .col = 417, .row = TOPBAR_H + 1 } });
+ setColumnPairWidth(p, 0, 418);
p.sync();
try std.testing.expectEqual(@as(u16, 418), p.view().rects[0].w);