diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-28 15:43:46 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:15 -0300 |
| commit | cd6ce6c2b3015c776644fb3866280f5dfd03addc (patch) | |
| tree | d4e38e5375b71ebec21ee18fe44870e314b2c783 /src/surface.zig | |
| parent | 0465775799cff895e3e830d2aa19f57966cdf21c (diff) | |
| download | pardes-cd6ce6c2b3015c776644fb3866280f5dfd03addc.tar.gz pardes-cd6ce6c2b3015c776644fb3866280f5dfd03addc.zip | |
A notice's word under the pointer is lit, in its band and the grid; mark_hover is gone
Open point 6 of docs/render-pipeline.md: notice words are Look and Exec
targets, so the hover affordance headers have is back on notices, painted
once in the notice's layer and joined into the grid from it. Deleted:
Surface.mark_hover, Cell.hover and render's per-frame reset of it, none of
which had been set since stage 5 (macOS loses its glass hover rect; its
build is ignored for now). Snapshot goldens unchanged.
Shared files touched: macos.zig (the hover bit's removal). Not touched:
pardes.zig, Messages.zig, mouse.zig, gui.zig, detached/*.
Diffstat (limited to 'src/surface.zig')
| -rw-r--r-- | src/surface.zig | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/src/surface.zig b/src/surface.zig index 07b593b1..b6f41853 100644 --- a/src/surface.zig +++ b/src/surface.zig @@ -38,12 +38,6 @@ pub const Cell = struct { len: u8 = 1, style: CellStyle = .{}, default: bool = true, - /// The look-hover affordance is on this cell: the word under the pointer - /// is a real Look or Exec operand, and hosts that draw the quiet tint as - /// more than a flat fill — macOS renders it as a glass overlay — read - /// this instead of guessing from the background colour, which a real - /// selection shares. - hover: bool = false, pub fn grapheme(c: *const Cell) []const u8 { return c.text[0..c.len]; @@ -405,10 +399,6 @@ pub const Chrome = struct { pub const Surface = struct { pub const PointerShape = enum(u8) { arrow, link, target }; pointer_shape: PointerShape = .arrow, - /// Set only for the duration of the look-hover paint, so the cells that - /// paint the quiet affordance can carry the hover bit through the ABI - /// without every selection painter learning a new parameter. - mark_hover: bool = false, body_layers: [MAX_PANES]Layer = @splat(.{}), tag_layers: [MAX_TAG_LAYERS]Layer = @splat(.{}), cols: u16 = 0, @@ -474,11 +464,7 @@ pub const Surface = struct { pub fn at(s: *Surface, x: u16, y: u16) *Cell { std.debug.assert(x < s.cols and y < s.rows); - const cell = &s.cells[@as(usize, y) * s.cols + x]; - // The look-hover paint runs with mark_hover set, and its cells are - // exactly the ones this marks — see render's preview block. - if (s.mark_hover) cell.hover = true; - return cell; + return &s.cells[@as(usize, y) * s.cols + x]; } pub fn set(s: *Surface, x: u16, y: u16, text: []const u8, style: CellStyle) void { |
