summaryrefslogtreecommitdiff
path: root/core/Places.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-26 04:46:20 -0300
committerGabriel Schneider <[email protected]>2026-11-26 04:46:20 -0300
commita4629d033cb11489371fe4dd987e9da48bd46690 (patch)
tree4aece54759c9b5e2b996ea31614693692778c31b /core/Places.zig
parent77b22e7c7623696feb52292bb86839870e20050d (diff)
downloadpardes-a4629d033cb11489371fe4dd987e9da48bd46690.tar.gz
pardes-a4629d033cb11489371fe4dd987e9da48bd46690.zip
body_layer: a selection that is the current place is drawn as the current place, its solid chip, not the selection (the coordinator's ruling on L2b's open point; DESIGN.md G7, B1.2: one meaning, one look): THE CAUSE: a live `/`, `n` and a picker's preview each select the current place (Places.settle takes the current one from a selection equal to it, and the walk lands a selection on it), and the body drew the primary selection over every place after Places.paint, so G7's solid current-hit chip showed only once the caret moved off it (L2b's report: "its current under the selection"); THE FIX: where the primary selection is exactly the current place (the same bytes, the places shown), the body leaves its tint off and the place's chip stands; the caret still shows (the tty's cursor, a preview's head cell), and a selection anywhere else, or grown past the place, is the selection as before; one comparison a frame a pane (the primary range against the current place), no new state; RUN (TEST FIRST): body_layer.zig "a selection that is the current place is drawn as the current place, its solid chip, not the selection ..." (orchard: a live `/alpha`, the first place's five cells `hit_current` in `hit_current_text`; Enter and `n`, the second's the same and the cursor on it; `x`, the line selected past it, the selection's ground): fails on L7 at body_layer.zig:1497 (expected #917a53, the chip; found #3c614a, the selection), passes now; Places.zig's "places: each on the hit ground ..." re-pinned where it asked L2b's open point ("searched again from line 2: its place current and selected, the selection over the hit": the chip now); core-test 1143/1316 (173 skipped: L7's 1142/1315 + this test); OUTSIDE my files: core/body_layer.zig (the rule and its test), core/Places.zig (one assertion of L2b's test); the goldens it moves are read with the rest at the end gate
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBFhdevVu48bvL9kCE
Diffstat (limited to 'core/Places.zig')
-rw-r--r--core/Places.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/Places.zig b/core/Places.zig
index 63f9ced6..b4ef17aa 100644
--- a/core/Places.zig
+++ b/core/Places.zig
@@ -928,13 +928,13 @@ test "places: each on the hit ground in its text's own ink, the current one soli
try std.testing.expectEqual(pardes.Color{ .rgb = c.hit }, other.bg);
try std.testing.expectEqual(pardes.Color{ .rgb = c.page.text }, other.fg);
}
- // Searched again from line 2: its place current and selected, the
- // selection over the hit; then `(`, no regex: the others faint (line
- // 10's: the prompt's words lie over the top rows).
+ // Searched again from line 2: its place current and selected, drawn as
+ // the place (body_layer: one meaning, one look); then `(`, no regex: the
+ // others faint (line 10's: the prompt's words lie over the top rows).
typeKeys(p, "/alpha");
try std.testing.expectEqual(@as(?usize, 1), pane.places.current);
s = try p.render(frame.allocator());
- for (0..4) |i| try std.testing.expectEqual(pardes.Color{ .rgb = c.page.selection.ground }, s.at(x + 6 + @as(u16, @intCast(i)), y + 1).style.bg);
+ for (0..4) |i| try std.testing.expectEqual(pardes.Color{ .rgb = c.hit_current }, s.at(x + 6 + @as(u16, @intCast(i)), y + 1).style.bg);
typeKeys(p, "(");
try std.testing.expect(pardes.Prompt.dims(p, pane));
s = try p.render(frame.allocator());