summaryrefslogtreecommitdiff
path: root/src/surface.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-16 22:17:47 -0300
committerGabriel Schneider <[email protected]>2026-11-16 22:32:11 -0300
commit266515537a917154ef4736a1d6b1cc97be23fced (patch)
tree9e0a10c3abd0c8911182c8b071f692e0b09a9310 /src/surface.zig
parentfc38c73c59f7855a4caad8aa4d3bb8e023309c13 (diff)
downloadpardes-266515537a917154ef4736a1d6b1cc97be23fced.tar.gz
pardes-266515537a917154ef4736a1d6b1cc97be23fced.zip
mouse: no drag guides, and columns resize by their grips alone
A drag draws no guide lines: the dashes where a pane or column would land, the carried column's rail and the held seam's dashes are gone, with the guide region kind, Surface.overlayDash, the rail's Region.clip and MAX_GUIDES; the gui's floating draw group is the debug box's alone. The line between two columns is no resize handle: Drag.border_v and its corner variant are gone, with clampBorderCol and the unused chromeTarget. A press there is a press in the pane under it (a sweep). A column resizes by its grip, a pane by its grip or, in a window, the rule above it (border_h, unchanged). Tests: the corner and border-drag unit tests and the cornerdrag and cornerdrag-left tty cases are deleted; windowops loses its border drag and tagalign2col widens its column by the grip; colgrip, shrinktag and windowops goldens drop the guides; a unit test pins that a press on the line between columns sweeps and resizes nothing. The cheatsheet, themes, render-pipeline notes and changelog say so. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/surface.zig')
-rw-r--r--src/surface.zig18
1 files changed, 1 insertions, 17 deletions
diff --git a/src/surface.zig b/src/surface.zig
index 9333a75e..ca517d3b 100644
--- a/src/surface.zig
+++ b/src/surface.zig
@@ -205,8 +205,6 @@ pub const Region = struct {
/// A column below the workspace tag, its bar and panes: its left
/// edge is the spine a pixel shell rules down it.
column,
- /// A drag's guide or a seam's hover hint, drawn over the panes.
- guide,
/// The debug stats box, drawn over the panes.
debug,
};
@@ -244,15 +242,9 @@ pub const Region = struct {
/// it shows, in pixels. Its placements are laid at the whole pixel; a
/// pixel frontend draws them the fraction higher.
scroll_px: f64 = 0,
- /// Cells the column-move rail takes off the right edge while it runs
- /// there: layers and pixel shells stop short of them, the grid does not.
- clip: u16 = 0,
};
-/// Guides a frame can draw: a run of a column-move rail per pane it skips
-/// the tags of, and a handful of border and hover dashes.
-pub const MAX_GUIDES = MAX_PANES + 4;
-pub const MAX_REGIONS = 1 + MAX_PANES * (4 + panes.Pane.Notices.max) + pardes.MAX_COLS * 3 + 1 + MAX_GUIDES + 1;
+pub const MAX_REGIONS = 1 + MAX_PANES * (4 + panes.Pane.Notices.max) + pardes.MAX_COLS * 3 + 1 + 1;
/// 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
@@ -470,14 +462,6 @@ pub const Surface = struct {
while (xx < x + w) : (xx += 1) s.at(xx, yy).* = .{};
}
}
-
- /// swap ONLY the glyph, keeping the cell's colors — the resize-handle hint
- pub fn overlayDash(s: *Surface, x: u16, y: u16, glyph: []const u8) void {
- const c = s.at(x, y);
- @memcpy(c.text[0..glyph.len], glyph);
- c.len = @intCast(glyph.len);
- c.default = false;
- }
};
test "cell visual equality ignores dead grapheme tail bytes" {