summaryrefslogtreecommitdiff
path: root/src/surface.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/surface.zig')
-rw-r--r--src/surface.zig21
1 files changed, 2 insertions, 19 deletions
diff --git a/src/surface.zig b/src/surface.zig
index a5dbea8e..c0f352ee 100644
--- a/src/surface.zig
+++ b/src/surface.zig
@@ -4,7 +4,6 @@ const pardes = @import("pardes.zig");
const std = @import("std");
const layout = @import("layout.zig");
const uucode = @import("uucode");
-const vaxis = @import("vaxis");
const panes = @import("panes.zig");
const config = @import("config.zig");
const MAX_PANES = pardes.MAX_PANES;
@@ -205,8 +204,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 +241,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
@@ -425,7 +416,7 @@ pub const Surface = struct {
const width: u16 = if (decoded == null or (cp < 0x80 and cp_slice.len == 1))
1
else
- @max(1, vaxis.gwidth.gwidth(cp_slice, .unicode));
+ @max(1, panes.File.utf8Width(cp_slice));
if (width == 2 and col + 1 >= end) return null;
var shown = cp_slice;
if (shown.len > @typeInfo(@FieldType(Cell, "text")).array.len) {
@@ -472,14 +463,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" {