From 3042f33df2b16b61c08d6535fba268103728dd1e Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Wed, 16 Sep 2026 12:26:38 -0300 Subject: Follow the tag gap in the Look hover preview test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The tag's first character moved to TAG_TEXT_INSET when the grip's hit area was separated from the text by a gap; the assertion kept reading GUTTER, which is now the gap itself and carries the plain tag background. The test's own point — that a preview on the tag's first character is paintable at tag column zero, PREFIX_W being a body concern — is unchanged; only where column zero is moved. Co-Authored-By: Claude Opus 5 (1M context) --- src/pardes.zig | 8 +++++--- 1 file 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); -- cgit v1.3