diff options
Diffstat (limited to 'test/panes.zig')
| -rw-r--r-- | test/panes.zig | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/panes.zig b/test/panes.zig index 88209693..bd39beba 100644 --- a/test/panes.zig +++ b/test/panes.zig @@ -2083,7 +2083,11 @@ const OutputTests = struct { _ = try p.render(frame.allocator()); const rect = p.view().rects[id]; const x = rect.x + config.GUTTER + panes.File.gutterWidth(help) + @as(u16, @intCast(at - line_start + 2)); - const y = (bodyY(p, rect)) + @as(u16, @intCast(row)); + // Its documentation above it wraps: the row the line starts on. + const shown = for (help.wrap_line[0..help.wrap_n], 0..) |line, i| { + if (line == @as(i32, @intCast(row))) break i; + } else return error.MissingTutorRow; + const y = (bodyY(p, rect)) + @as(u16, @intCast(shown)); p.update(.{ .mouse = .{ .button = config.exec_button, .kind = .press, .col = x, .row = y } }); p.update(.{ .mouse = .{ .button = config.exec_button, .kind = .release, .col = x, .row = y } }); try std.testing.expect(p.view().active != id); |
