summaryrefslogtreecommitdiff
path: root/core/bindings.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-26 09:57:32 -0300
committerGabriel Schneider <[email protected]>2026-11-26 11:19:58 -0300
commit44a04dc0eaa1697cee42219a2aa814352c63fbe6 (patch)
treeee9f5269278926655f74429c1687ba1a64f95bac /core/bindings.zig
parent6b2b63f654561ba9d64c134e6ccc6c0784e15220 (diff)
downloadpardes-44a04dc0eaa1697cee42219a2aa814352c63fbe6.tar.gz
pardes-44a04dc0eaa1697cee42219a2aa814352c63fbe6.zip
draw, colors: the band (a picker's rows, a level, a prompt's list, Help, the registers) drawn from the chrome on its tag's ground, focused or not, whatever its mode (DESIGN.md B6, G1'), and its cursor row on that ground's selection, a ground of its own (B1.3): its text, dim, rule, kind mark and name tint the tag ground's (`chrome.on(g)`, `name[g]`), the cursor row's text and dim the selection's, its keys, `▶` and matched letters the selection's own key and match inks (`Selection.key`, `Selection.match`, new, the accent and the hits' hue held 4.5:1 on that selection at a theme change; the ground's key and match stay held on the ground alone, D4's goldens for neonotte84 and acme unmoved); THE CAUSE where it was wrong: the band read the old view's Roles, whose key and match were pushed toward white or black over all seven tag and selection grounds at once (A5.7's joint floor: one ink for every ground) and whose reading grounds were the reading tint, so after the tag above it moved to the chrome's focus ground the band under a reading pane sat on the old tint; THE FIX: joinBand reads `p.chrome()` alone, and `Roles`, `RoleInks`, `TagGround`, `inksOn`, `toward`, `pushAway`, `matchHue` and `selectionOf` are deleted (nothing reads them: the tags, the grips, the notice row and the message inks moved in the change before), with ChromeTheme's `roles`; the ring test checks each ground's selection key and match (4.5:1 where its ground reaches it) and every grip fill's message marks (4.5:1 where the hue reaches it on the fill and, at rest and reading, the plain tag); its old copy of those checks, "every theme's walk UI roles meet their floors ...", goes with Roles (the ring's per-ground `inks` check holds the same floors on the chrome); RUN (TEST FIRST): Band.zig "a band is drawn in the theme's roles ..." re-pinned (the cursor row's `▶`, chord and matched letters in the selection's key and match, the spines in the focused tag's rule: on the base its reading pane's band was on the reading tint's Roles), Band.zig's register dim, Pick.zig's two band tests and bindings.zig's registers on the focused tag's inks; GOLDENS: none moved (no process golden captures a band's style); GATES (tui): core-test 1154/1328 (174 skipped: the Roles test gone), process-test 0 of 103 failed with --update (0 re-recorded); the ring 245 of 245; load 5.9 to 6.5; OUTSIDE draw.zig: core/colors.zig (Selection.key/match, groundInks, Roles deleted, the ring's two checks), core/Band.zig, core/Pick.zig, core/bindings.zig (tests)
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBFhdevVu48bvL9kCE
Diffstat (limited to 'core/bindings.zig')
-rw-r--r--core/bindings.zig5
1 files changed, 2 insertions, 3 deletions
diff --git a/core/bindings.zig b/core/bindings.zig
index 3884aca0..da8ed4dc 100644
--- a/core/bindings.zig
+++ b/core/bindings.zig
@@ -619,8 +619,7 @@ test "\" shows the registers rolled, the ones holding something, each its value
try std.testing.expect(std.mem.indexOf(u8, band.items, "p after P before R replace y into") != null);
// The empty register's `—` and the names in the dim ink, the verbs'
// letters bold in the key ink.
- const roles = &p.chromeTheme().roles;
- const inks = roles.on(if (pardes.Trail.reading(p, pane)) .reading_focused else .focused);
+ const inks = p.chrome().on(.focus);
const Cells = struct {
fn at(l: *const pardes.Layer, word: []const u8) ?*const pardes.Cell {
for (0..l.rows) |row| {
@@ -637,7 +636,7 @@ test "\" shows the registers rolled, the ones holding something, each its value
};
try std.testing.expectEqual(pardes.Color{ .rgb = inks.dim }, Cells.at(layer, "last search").?.style.fg);
const verbs = Cells.at(layer, "p after").?;
- try std.testing.expectEqual(pardes.Color{ .rgb = roles.key }, verbs.style.fg);
+ try std.testing.expectEqual(pardes.Color{ .rgb = inks.key }, verbs.style.fg);
try std.testing.expect(verbs.style.bold);
for (0..layer.rows) |row| {
const cells = layer.cells[row * layer.cols ..][0..layer.cols];