summaryrefslogtreecommitdiff
path: root/src/layout.zig
diff options
context:
space:
mode:
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);