summaryrefslogtreecommitdiff
path: root/src/mouse.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/mouse.zig')
-rw-r--r--src/mouse.zig13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/mouse.zig b/src/mouse.zig
index 6cec562d..e38d5d5f 100644
--- a/src/mouse.zig
+++ b/src/mouse.zig
@@ -178,7 +178,6 @@ fn cornerFixture(gpa: std.mem.Allocator) !*Pardes {
}
test "a pane's last row of text is no resize handle; the rule over the next pane is" {
- if (platform == .web) return;
const p = try cornerFixture(std.testing.allocator);
defer p.deinit();
const seam = seamRowOf(p, 1, 0);
@@ -190,7 +189,6 @@ test "a pane's last row of text is no resize handle; the rule over the next pane
}
test "a pane's grip dragged up or down its own column moves its top, down to the floor of the pane above" {
- if (platform == .web) return;
const p = try cornerFixture(std.testing.allocator);
defer p.deinit();
const upper = p.col_panes[1][0];
@@ -230,7 +228,7 @@ fn nudgeRightSeam(p: *Pardes, delta: i32) u16 {
pub const ChromeTarget = struct { col: u16, row: u16 };
-/// The chrome a press at `col`, `row` takes (web.zig): the tag rows; then,
+/// The chrome a press at `col`, `row` takes: the tag rows; then,
/// on the cell, a pane's grip, a column's handle or a seam; then a cell
/// away, any of a pane's tag, a handle or a seam.
pub fn chromeTarget(p: *const Pardes, col: u16, row: u16) ?ChromeTarget {
@@ -260,7 +258,6 @@ pub fn chromeTarget(p: *const Pardes, col: u16, row: u16) ?ChromeTarget {
}
test "a press near chrome takes it: the tag rows, a column's handle or a seam on its cell or a cell away, a pane's tag; nothing in a body" {
- if (platform == .web) return;
const p = try cornerFixture(std.testing.allocator);
defer p.deinit();
// Column 0's two panes share its rows evenly; column 1's lower one is
@@ -1156,8 +1153,8 @@ fn mirrorTtySelection(p: *Pardes, pane: *Pane) void {
/// second selects what edit.doubleClickRange says, from the caret the click
/// left. A plain click still puts the caret on its cell.
fn doubleClick(p: *Pardes, id: usize, t: *panes.Text, on_tag: bool, row: i32, col: i32) void {
- // The host's clock, which every host keeps (a libc clock is no clock on
- // the web) and a test's virtual one replaces.
+ // The host's clock, which every host keeps and a test's virtual one
+ // replaces.
const now: i64 = @intCast(p.now_ns / std.time.ns_per_ms);
const prev = p.last_click;
p.last_click = .{ .id = id, .on_tag = on_tag, .row = row, .col = col, .ms = now };
@@ -1588,7 +1585,6 @@ test "a corner drag's two axes clamp independently" {
}
test "a v-handle press at the RIGHT column's seam drags both boundaries" {
- if (platform == .web) return;
const p = try cornerFixture(std.testing.allocator);
defer p.deinit();
try std.testing.expectEqual(@as(usize, 2), p.col_n[1]);
@@ -1619,7 +1615,6 @@ test "a v-handle press at the RIGHT column's seam drags both boundaries" {
}
test "a tie row still moves the LEFT column's pane pair only" {
- if (platform == .web) return;
const p = try cornerFixture(std.testing.allocator);
defer p.deinit();
@@ -1645,7 +1640,6 @@ test "a tie row still moves the LEFT column's pane pair only" {
}
test "a v-handle press at nobody's seam is still a plain edge drag" {
- if (platform == .web) return;
const p = try cornerFixture(std.testing.allocator);
defer p.deinit();
const right_seam = nudgeRightSeam(p, 3);
@@ -1671,7 +1665,6 @@ test "a v-handle press at nobody's seam is still a plain edge drag" {
}
test "a RIGHT-column corner's two axes clamp independently" {
- if (platform == .web) return;
const p = try cornerFixture(std.testing.allocator);
defer p.deinit();
const right_seam = nudgeRightSeam(p, 3);