diff options
Diffstat (limited to 'src/pardes.zig')
| -rw-r--r-- | src/pardes.zig | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/pardes.zig b/src/pardes.zig index c1a6b038..94f67ced 100644 --- a/src/pardes.zig +++ b/src/pardes.zig @@ -4280,10 +4280,12 @@ test "Look hover waits without mutating the pane and input cancels it" { try std.testing.expect(!p.animationActive()); // File PREFIX_W belongs only to body line numbers. A preview on the tag's - // first character must be paintable all the way at tag column zero. + // first character must be paintable all the way at tag column zero — which + // is TAG_TEXT_INSET, not GUTTER: the grip keeps the gutter and the gap + // beside it separates the grip's hit area from the text. const tag_y = if (p.settings.tag_bottom) rect.y + rect.h - BOX_H else rect.y; p.look_hover_preview = .{ - .col = rect.x + config.GUTTER, + .col = rect.x + TAG_TEXT_INSET, .row = tag_y, .pane = p.active, .serial = pane.serial, @@ -4291,7 +4293,7 @@ test "Look hover waits without mutating the pane and input cancels it" { }; _ = frame.reset(.retain_capacity); const tag_surface = try p.render(frame.allocator()); - try std.testing.expectEqual(Color{ .rgb = expected_bg }, tag_surface.at(rect.x + config.GUTTER, tag_y).style.bg); + try std.testing.expectEqual(Color{ .rgb = expected_bg }, tag_surface.at(rect.x + TAG_TEXT_INSET, tag_y).style.bg); p.look_hover_preview = null; p.update(motion); |
