summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-16 12:26:38 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:14 -0300
commit3042f33df2b16b61c08d6535fba268103728dd1e (patch)
treeda4d21526e81cbfd6a46ba56708de9a14cecd0bb /src
parent564b35d26d7f90cea26379af71366d428719e7fe (diff)
downloadpardes-3042f33df2b16b61c08d6535fba268103728dd1e.tar.gz
pardes-3042f33df2b16b61c08d6535fba268103728dd1e.zip
Follow the tag gap in the Look hover preview test
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) <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/pardes.zig8
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);