From 18d89dcedaed1f8437799621675e88ca47d7cdc1 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Sat, 24 Oct 2026 10:29:10 -0300 Subject: Search converge 2/6: a pane's places, every match or listed place tinted and ticked on the rail, n/N stepping them silently, shifted by an edit rather than searched again --- src/surface.zig | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/surface.zig') diff --git a/src/surface.zig b/src/surface.zig index 839e8f33..8ed4074c 100644 --- a/src/surface.zig +++ b/src/surface.zig @@ -392,6 +392,10 @@ pub const MAX_REGIONS = 1 + MAX_PANES * (4 + panes.Pane.Notices.max) + pardes.MA /// The colours a pixel shell draws its chrome in (rules, rails, grips, the /// tag underlay), resolved by the core each frame, so a frontend attached /// to a detached session draws them from the frame alone. +pub const RailTick = struct { owner: u8, at: u16, current: bool }; +pub const max_rail_ticks = 4096; +pub const rail_tick_scale = 1024; + pub const Chrome = struct { /// The theme's ground and ink; null where it leaves them to the shell. page: ?[3]u8 = null, @@ -407,6 +411,9 @@ pub const Chrome = struct { tag_fg: [3]u8 = .{ 0, 0, 0 }, scroll_track: [3]u8 = .{ 0, 0, 0 }, scroll_thumb: [3]u8 = .{ 0, 0, 0 }, + /// A pane's places' ticks on its rail, and its current one's. + match_tick: [3]u8 = .{ 0, 0, 0 }, + match_current: [3]u8 = .{ 0, 0, 0 }, /// The theme's accent (a glow's tint). accent: [3]u8 = .{ 0, 0, 0 }, /// A selection's text and ground: a lift keeps their contrast too. @@ -477,6 +484,11 @@ pub const Surface = struct { rows: u16 = 0, regions: [MAX_REGIONS]Region = undefined, nregions: u16 = 0, + /// The panes' places' ticks on their rails (Places.addTicks), + /// placed with the regions: each at `at` 1/`rail_tick_scale`s down its + /// rail's track, the pane's current match's marked. + rail_ticks: [max_rail_ticks]RailTick = undefined, + nrail_ticks: u16 = 0, chrome: Chrome = .{}, cells: []Cell = &.{}, /// bar: draw an insert-style thin cursor instead of the block -- cgit v1.3