summaryrefslogtreecommitdiff
path: root/src/surface.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-24 10:29:10 -0300
committerGabriel Schneider <[email protected]>2026-10-24 10:29:10 -0300
commit18d89dcedaed1f8437799621675e88ca47d7cdc1 (patch)
tree2cf2e2ae46de1308e5b90aca33413282cdd73e8b /src/surface.zig
parent873f81ccb1449119846de8d4e6e0e8899236100a (diff)
downloadpardes-18d89dcedaed1f8437799621675e88ca47d7cdc1.tar.gz
pardes-18d89dcedaed1f8437799621675e88ca47d7cdc1.zip
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
Diffstat (limited to 'src/surface.zig')
-rw-r--r--src/surface.zig12
1 files changed, 12 insertions, 0 deletions
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