diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-04 23:27:59 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-04 23:35:18 -0300 |
| commit | 383256a741117596931c4e3817491041fde5229d (patch) | |
| tree | af2ae2e868c8b514a12598c4ac7b5cd0fe2fc6f7 /test | |
| parent | 3b790a525c964f5b1dd4c1296c8291b7ecc3da22 (diff) | |
| download | pardes-383256a741117596931c4e3817491041fde5229d.tar.gz pardes-383256a741117596931c4e3817491041fde5229d.zip | |
config: look_preview_delay_frames is a u16, as its ?u16 was never null: every orelse return after it, look.zig's discarded delay, and the report's never-written Look hover delay: off line go, the tests passing the constant (pardes.zig, ninep/tree.zig and ctl.zig's test take one line each)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'test')
| -rw-r--r-- | test/panes.zig | 2 | ||||
| -rw-r--r-- | test/pdf.zig | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/test/panes.zig b/test/panes.zig index 6b2af760..f083a88e 100644 --- a/test/panes.zig +++ b/test/panes.zig @@ -769,7 +769,7 @@ const ClickCursorTests = struct { try std.testing.expect(std.mem.endsWith(u8, unselected, " gamma\n")); } - const delay = config.look_preview_delay_frames orelse return; + const delay = config.look_preview_delay_frames; p.update(.{ .mouse = .{ .button = .none, .kind = .motion, .col = x + 2, .row = y + 2 } }); for (0..delay) |_| p.update(.tick); const selected_preview = p.look_hover_preview orelse return error.MissingSelectionHover; diff --git a/test/pdf.zig b/test/pdf.zig index 16522af6..ef05f789 100644 --- a/test/pdf.zig +++ b/test/pdf.zig @@ -148,7 +148,7 @@ const PdfLinkTests = struct { fn hover(p: *Pardes, cell: Cell) void { p.update(.{ .mouse = .{ .button = .none, .kind = .motion, .col = cell.col, .row = cell.row } }); - for (0..(config.look_preview_delay_frames orelse 0)) |_| p.update(.tick); + for (0..config.look_preview_delay_frames) |_| p.update(.tick); } test "PDF links hover clears on leave page and reload while right drag chooses Look text" { @@ -1764,7 +1764,8 @@ test "PDF native mouse selection, Look, and highlights share page geometry" { // presentation state. In particular it must not borrow the click path, // whose page activation and persistent selection are intentional effects // of a gesture rather than observation. - if (config.look_preview_delay_frames) |delay| { + { + const delay = config.look_preview_delay_frames; const active_before = p.active; const page_before = pv.page; const scroll_before = pv.document_scroll_y; |
