summaryrefslogtreecommitdiff
path: root/test/pdf.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-04 23:27:59 -0300
committerGabriel Schneider <[email protected]>2026-11-04 23:35:18 -0300
commit383256a741117596931c4e3817491041fde5229d (patch)
treeaf2ae2e868c8b514a12598c4ac7b5cd0fe2fc6f7 /test/pdf.zig
parent3b790a525c964f5b1dd4c1296c8291b7ecc3da22 (diff)
downloadpardes-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/pdf.zig')
-rw-r--r--test/pdf.zig5
1 files changed, 3 insertions, 2 deletions
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;